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: support Connection API options in connection string #542

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

olavloite
Copy link
Collaborator

PostgreSQL supports sending session configuration parameters in the Startup message. These can be embedded in the connection string of many clients, such as JDBC. This worked for session configuration parameters that are maintained in PGAdapter, but not for the very specific session configuration parameters that are maintained by the Connection API, such as spanner.autocommit_dml_mode or spanner.read_only_staleness. This PR adds support for those session options in the StartupMessage.

PostgreSQL supports sending session configuration parameters in the Startup
message. These can be embedded in the connection string of many clients, such
as JDBC. This worked for session configuration parameters that are maintained
in PGAdapter, but not for the very specific session configuration parameters
that are maintained by the Connection API, such as `spanner.autocommit_dml_mode`
or `spanner.read_only_staleness`. This PR adds support for those session
options in the StartupMessage.
@codecov
Copy link

codecov bot commented Dec 9, 2022

Codecov Report

Merging #542 (0291640) into postgresql-dialect (52fba80) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@                   Coverage Diff                    @@
##             postgresql-dialect     #542      +/-   ##
========================================================
+ Coverage                 88.39%   88.41%   +0.01%     
- Complexity                 2068     2069       +1     
========================================================
  Files                       122      122              
  Lines                      6783     6791       +8     
  Branches                    954      956       +2     
========================================================
+ Hits                       5996     6004       +8     
  Misses                      558      558              
  Partials                    229      229              
Flag Coverage Δ
all_tests 88.41% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...panner/pgadapter/statements/BackendConnection.java 93.08% <100.00%> (+0.11%) ⬆️

📣 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 December 9, 2022 20:27
@olavloite olavloite merged commit 6247412 into postgresql-dialect Dec 13, 2022
@olavloite olavloite deleted the connection-api-options branch December 13, 2022 07:31
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.

2 participants