-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Spanner JDBC: Add Spanner JDBC driver to google-cloud-contrib #6007
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
Conversation
* create jdbc project * added spanner-jdbc to versions
add interfaces for client side statements
* create jdbc project * added spanner-jdbc to versions * add interfaces for client side statements * changed prerequisiteStatements to examplePrequisiteStatements * add generic connection interface * changed to normal getter name
#5808) add public jdbc interface for Cloud Spanner
…5813) add util for parsing read-only staleness values
* add DirectExecuteResultSet * readability: extracted numberOfParameters and firstParameterType to vars
* add ReplaceableForwardingResultSet * fixed CR year * added note for zero-based column indices + added vars for readability
* add StatementResultImpl * added missing test cases for convenience methods
* add client side statement parser * changed loops to a map lookup * fixed spacing between variables and javadoc * merge with spanner-jdbc * changed lists to sets
…tion retries (#5876) * add specific AbortedExceptions for failed tx retries * updated CR year
…tions (#5881) add base interface for unit of work on connections
…anner (#5877) * add jdbc types and type mappings for Cloud Spanner * update CR year * changed name to getSpannerType * simplified if statements and added curly braces to for loops
* add CredentialService * updated CR year * remove public visibility * make getAppDefault overridable and mock this in the test * removed 'internal' from private method name * add error msg as constant * removed custom httptransport
* add ConnectionOptions * add SpannerPool * removed auto-generated methods * changed to get-and-check-for-null get and check for null is more appropriate in this case, as we would never want to return null from this method * added documentation * fixed wrong null check
* add jdbc types and type mappings for Cloud Spanner * update CR year * add jdbc ResultSet * added null checks and javadoc and fixed formatting * added missing checks for negative overflow and added test cases * fixed camel case * refactored if-statements into one, added actual check for toString * removed formatter hints * extracted to variable + added extra documentation
* add ConnectionImpl * fix CR year * moved DdlClient creation to separate method * updated changed class reference
* add ReadWriteTransaction * refactor inner classes to separate files * included allowed state to error msg * added javadoc to the COMMIT and RUN BATCH statements * removed todo no longer needed in public repo
* add DmlBatch * updated CR year
* add jdbc connection implementation * update CR year * add warnings for ClientInfo
…tation (#5911) * add jdbc Statement and PreparedStatement implementation * updated CR year * return successful/failed ddl statements * changed variable names from x to value * added missing test cases
* add DdlBatch * return successful/failed DDL statements * extracted update count extraction to a separate method
* add parameter store for jdbc parameters * add null check * added additional test statements * added tests for null values in array and null-array
* add JdbcDriver * add jdbc DataSource implementation * removed information from test connection url
* add JdbcDatabaseMetadata * added implementation for getUserName
…#5931) * fixes compile errors, missing test classes and test failures * updated CR years
* change integration tests to use the Spanner IT test env * add DDL integration tests * add extra information on failure * fix typo * extract correct error code * merge with spanner-jdbc
…ns and retries (#6003) * add integration tests for transactions and retries * add assertions that the values are actually written
…ipts (#5999) * change integration tests to use the Spanner IT test env * use util method from verifier for reading sql statements from file * integration tests hat are executed purely using sql scripts * fixed typo's and removed unnecessary test statement
Codecov Report
@@ Coverage Diff @@
## master #6007 +/- ##
============================================
+ Coverage 46.79% 47.02% +0.22%
- Complexity 25663 27107 +1444
============================================
Files 2456 2516 +60
Lines 267638 273463 +5825
Branches 30559 31321 +762
============================================
+ Hits 125245 128587 +3342
- Misses 133133 134453 +1320
- Partials 9260 10423 +1163
Continue to review full report at Codecov.
|
* upgrade http-client for nanos * add nanosecond support
| @@ -17,6 +17,7 @@ | |||
| package com.google.cloud.spanner; | |||
|
|
|||
| import com.google.api.core.ApiFunction; | |||
| import com.google.api.core.InternalApi; | |||
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.
Looks like a bad merge here?
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.
Yep, the change to ServiceOptions had not been merged in. I'll add it.
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.
The change to ServiceOptions has been added.
* Move setClientLibToken to ServiceOptions. * Address PR comments
kolea2
left a comment
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.
do not merge yet
Adds a JDBC driver for Cloud Spanner.