Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace pg_catalog tables with common table expressions #331

Merged
merged 18 commits into from
Aug 24, 2022

Conversation

olavloite
Copy link
Collaborator

@olavloite olavloite commented Aug 21, 2022

Replaces pg_catalog table references with common table expressions:

  1. pg_namespace is added with two fixed entries.
  2. pg_type is added with 14 fixed entries.

This setup can be used to add more pg_catalog tables that are needed by drivers / frameworks.

@codecov
Copy link

codecov bot commented Aug 21, 2022

Codecov Report

Merging #331 (d21aa2b) into postgresql-dialect (8a587af) will increase coverage by 0.12%.
The diff coverage is 87.21%.

@@                   Coverage Diff                    @@
##             postgresql-dialect     #331      +/-   ##
========================================================
+ Coverage                 83.83%   83.95%   +0.12%     
- Complexity                 1531     1593      +62     
========================================================
  Files                       112      114       +2     
  Lines                      5232     5417     +185     
  Branches                    683      727      +44     
========================================================
+ Hits                       4386     4548     +162     
- Misses                      633      643      +10     
- Partials                    213      226      +13     
Flag Coverage Δ
all_tests 83.95% <87.21%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../cloud/spanner/pgadapter/session/SessionState.java 99.03% <ø> (+1.36%) ⬆️
...dapter/statements/JdbcMetadataStatementHelper.java 79.89% <ø> (-0.11%) ⬇️
...oud/spanner/pgadapter/statements/SimpleParser.java 90.51% <72.30%> (-3.87%) ⬇️
.../cloud/spanner/pgadapter/statements/PgCatalog.java 92.59% <92.59%> (ø)
...loud/spanner/pgadapter/statements/TableParser.java 93.33% <93.33%> (ø)
...ud/spanner/pgadapter/metadata/OptionsMetadata.java 77.55% <100.00%> (+0.45%) ⬆️
...panner/pgadapter/statements/BackendConnection.java 90.67% <100.00%> (+0.04%) ⬆️
...spanner/pgadapter/commands/InvalidMetaCommand.java 100.00% <0.00%> (+20.00%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@olavloite olavloite marked this pull request as ready for review August 21, 2022 18:15
@olavloite olavloite merged commit 4b01399 into postgresql-dialect Aug 24, 2022
@olavloite olavloite deleted the pg-catalog-replacement-tables branch August 24, 2022 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant