-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: support untyped NULL value parameters #1224
Conversation
src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcPreparedStatement.java
Outdated
Show resolved
Hide resolved
src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcPreparedStatementTest.java
Show resolved
Hide resolved
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.
JSON and JSONB are nullable. But I see that the setNullValue() method does not cover JSON and JSONB data types (JsonType.VENDOR_TYPE_NUMBER and PgJsonbType.VENDOR_TYPE_NUMBER are missing from switch case). Can we add these too and verify once if all supported data types are included in the switch case so we do not miss out on any case? Let me know if we should do this as a separate exercise.
Good point, I've added those to the switch case as well. |
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.
LGTM
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.
LGTM
🤖 I have created a release *beep* *boop* --- ## [2.11.0](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.10.0...v2.11.0) (2023-06-12) ### Features * Support untyped NULL value parameters ([#1224](https://togithub.com/googleapis/java-spanner-jdbc/issues/1224)) ([80d2b9d](https://togithub.com/googleapis/java-spanner-jdbc/commit/80d2b9d3e4c3265522bbb20766bff1f164617711)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.11.0 ([#1254](https://togithub.com/googleapis/java-spanner-jdbc/issues/1254)) ([41f40fc](https://togithub.com/googleapis/java-spanner-jdbc/commit/41f40fce634cea205d5e5a9c1eb567ecb97ff655)) * Update dependency com.google.cloud:google-cloud-spanner-bom to v6.42.3 ([#1248](https://togithub.com/googleapis/java-spanner-jdbc/issues/1248)) ([397d573](https://togithub.com/googleapis/java-spanner-jdbc/commit/397d5738a8126aaf090d533d0f20efb74a77a788)) * Update dependency com.google.cloud:google-cloud-spanner-bom to v6.43.0 ([#1255](https://togithub.com/googleapis/java-spanner-jdbc/issues/1255)) ([ffe36b6](https://togithub.com/googleapis/java-spanner-jdbc/commit/ffe36b6b2087157c8d895fa348cff614435a4735)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Support untyped null parameter values for
PreparedStatement
. This will allow users to add null values as a statement parameter value without having to know what type the column that the parameter is bound to uses.