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

Change autocommit/readonly value on connection creation #378

Merged
merged 2 commits into from
May 26, 2021

Conversation

elefeint
Copy link
Contributor

Minor but longstanding feature debt for parity with JDBC driver.

Also removes unused SpannerConnectionConfiguration parameter in connection.

Fixes #294, #295.

@elefeint elefeint requested review from meltsufin and dzou May 25, 2021 14:32
@google-cla google-cla bot added the cla: yes label May 25, 2021
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

86.0% 86.0% Coverage
0.0% 0.0% Duplication

return config.build();
}

private boolean getBooleanFlag(Object value) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this method necessary? I think options.getValue(READONLY) will always return a boolean if it's declared as a Option<Boolean> initially. (maybe)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, no -- when the option is coming through a URL, it will get parsed as String. But R2DBC will likely address this in the future (r2dbc/r2dbc-spi#206), so I am hoping that this method is temporary.

@elefeint elefeint merged commit a5cb3d9 into main May 26, 2021
@elefeint elefeint deleted the allow-setting-autocommit-and-readonly branch May 26, 2021 19:38
@elefeint elefeint mentioned this pull request May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add autocommit property
3 participants