Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@olavloite
Copy link

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.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 24, 2019
@olavloite olavloite requested a review from kolea2 July 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
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
Author

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 kolea2 July 24, 2019 20:46
@codecov
Copy link

codecov bot commented Jul 25, 2019

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 Files Coverage Δ Complexity Δ
...age/contrib/nio/SeekableByteChannelPrefetcher.java 63.12% <0%> (-3.13%) 21% <0%> (-2%)
...gle/cloud/pubsub/v1/SequentialExecutorService.java 90.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-jdbc Jul 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants