-
Notifications
You must be signed in to change notification settings - Fork 1.1k
spanner-jdbc: Step 02 - Client side statement interfaces #5806
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
spanner-jdbc: Step 02 - Client side statement interfaces #5806
Conversation
| "regex": "(?is)\\A\\s*show\\s+variable\\s+commit_timestamp\\s*\\z", | ||
| "method": "statementShowCommitTimestamp", | ||
| "exampleStatements": ["show variable commit_timestamp"], | ||
| "prerequisiteStatements": ["update foo set bar=1"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm my understanding, these are returned on getPrerequisiteStatements as examples of what needs to be called beforehand? If yes, can we call these examplePrerequisiteStatements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your assumption is correct, and these example prerequisite statements are used by some automated test cases that execute the example statements. I've changed the name of the field and the getter.
db363e0 to
b83c841
Compare
Codecov Report
@@ Coverage Diff @@
## spanner-jdbc #5806 +/- ##
==================================================
+ Coverage 46.11% 46.12% +<.01%
- Complexity 24187 24189 +2
==================================================
Files 2456 2456
Lines 262236 262236
Branches 29602 29602
==================================================
+ Hits 120943 120949 +6
+ Misses 132179 132175 -4
+ Partials 9114 9112 -2
Continue to review full report at Codecov.
|
…5806) add interfaces for client side statements
The Cloud Spanner jdbc driver supports several client side statements that are interpreted by the driver instead of being sent to Cloud Spanner. These statements are defined in the ClientSideStatements.json file. Whenever a statement is executed by the driver, it checks whether it is a client side statement, and if so, interprets it and passes it into a
ConnectionStatementExecutorthat will call the appropriate method on aConnection.