Skip to content

spanner-jdbc: Step 09 - StatementResultImpl - #5847

Merged
olavloite merged 2 commits into
googleapis:spanner-jdbcfrom
olavloite:spanner-jdbc-09-statement-result-impl
Jul 25, 2019
Merged

spanner-jdbc: Step 09 - StatementResultImpl#5847
olavloite merged 2 commits into
googleapis:spanner-jdbcfrom
olavloite:spanner-jdbc-09-statement-result-impl

Conversation

@olavloite

Copy link
Copy Markdown
Contributor

Adds implementation for StatementResult. StatementResult is a wrapper around the result returned by a generic statement that is executed by the JDBC Driver. It can contain:

  • A ResultSet returned by a query on Cloud Spanner, or a ResultSet returned by a client side statement (e.g. SHOW VARIABLE AUTOCOMMIT).
  • An update count returned by a DML statement on Cloud Spanner. There are no client side statements that return an update count.
  • No result: DDL statements on Cloud Spanner do not return any results. SET <VARIABLE_NAME> = <VALUE> type client side statements also do not return any results.

@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 24, 2019
@olavloite
olavloite requested a review from kolea2July 24, 2019 09:28
* one STRING column containing an {@link Enum} value and one row that is created by a {@link
* ClientSideStatement}.
*/
static StatementResult resultSet(

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.

do we need more tests here for all the different types?

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.

I've added test cases for all the missing convenience methods.

@olavloite
olavloite requested a review from kolea2July 24, 2019 20:46
@codecov

codecovBot commented Jul 25, 2019

Copy link
Copy Markdown

Codecov Report

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

Impacted file tree graph

@@ Coverage Diff @@## spanner-jdbc #5847 +/- ##
==================================================
- Coverage 46.12% 46.12% -0.01% + Complexity 24189 24187 -2 
==================================================
Files 2456 2456 Lines 262236 262236 Branches 29602 29602 ==================================================
- Hits 120949 120947 -2 - Misses 132175 132176 +1 - Partials 9112 9113 +1
Impacted FilesCoverage ΔComplexity Δ
...age/contrib/nio/SeekableByteChannelPrefetcher.java63.12% <0%> (-3.13%)21% <0%> (-2%)
...gle/cloud/pubsub/v1/SequentialExecutorService.java90.8% <0%> (+3.44%)0% <0%> (ø)⬇️

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 ae46c78...5215052. Read the comment docs.

@olavloite
olavloite merged commit 448b24c into googleapis:spanner-jdbcJul 25, 2019
olavloite added a commit to olavloite/google-cloud-java that referenced this pull request Aug 5, 2019
* add StatementResultImpl
* added missing test cases for convenience methods
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.

3 participants

@olavloite@kolea2@googlebot