Skip to content

spanner-jdbc: Step 02 - Client side statement interfaces - #5806

Merged
olavloite merged 6 commits into
googleapis:spanner-jdbcfrom
olavloite:spanner-jdbc-02-client-side-statement-interfaces
Jul 24, 2019
Merged

spanner-jdbc: Step 02 - Client side statement interfaces#5806
olavloite merged 6 commits into
googleapis:spanner-jdbcfrom
olavloite:spanner-jdbc-02-client-side-statement-interfaces

Conversation

@olavloite

Copy link
Copy Markdown
Contributor

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 ConnectionStatementExecutor that will call the appropriate method on a Connection.

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 23, 2019
@olavloite
olavloite changed the base branch from master to spanner-jdbcJuly 23, 2019 11:47
@olavloite
olavloite marked this pull request as ready for review July 23, 2019 11:48
@olavloite
olavloite requested a review from kolea2July 23, 2019 11:49
"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"]

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
ContributorAuthor

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.

@olavloite
olavloiteforce-pushed the spanner-jdbc-02-client-side-statement-interfaces branch from db363e0 to b83c841CompareJuly 23, 2019 15:18
@codecov

codecovBot commented Jul 23, 2019

Copy link
Copy Markdown

Codecov Report

Merging #5806 into spanner-jdbc will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@ 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
Impacted FilesCoverage ΔComplexity Δ
...gle/cloud/pubsub/v1/SequentialExecutorService.java87.35% <0%> (-3.45%)0% <0%> (ø)
.../com/google/cloud/pubsub/v1/MessageDispatcher.java85.12% <0%> (+0.51%)23% <0%> (ø)⬇️
...gle/cloud/storage/testing/RemoteStorageHelper.java64.46% <0%> (+2.47%)9% <0%> (ø)⬇️
...age/contrib/nio/SeekableByteChannelPrefetcher.java66.25% <0%> (+3.12%)23% <0%> (+2%)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cafacf1...1da3c26. Read the comment docs.

@kolea2kolea2 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 23, 2019
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 23, 2019
@olavloite
olavloite merged commit ae46c78 into googleapis:spanner-jdbcJul 24, 2019
olavloite added a commit to olavloite/google-cloud-java that referenced this pull request Aug 5, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@olavloite@kolea2@googlebot@yoshi-kokoro