Skip to content

Commit ca1c906

Browse files
authored
feat: support JSON data type (googleapis#447)
* feat: support JSON data type fix: NPE was thrown when getting an array of structs from a ResultSet (#445) A NullPointerException was thrown if a ResultSet contained an array of Structs and the getArray() method was called on the column. Fixes #444 fix: cleanup and add documentation chore(deps): update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.0.2 (#443) chore: regenerate README (#450) chore(deps): update dependency com.google.cloud:libraries-bom to v20.2.0 (#448) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.1.0` -> `20.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/compatibility-slim/20.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.2.0/confidence-slim/20.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: add SECURITY.md (#446) chore: add SECURITY.md feat: allow get/set Spanner Value instances (#454) Adds support for getting a value from a `java.sql.ResultSet` as a `com.google.cloud.spanner.Value` instance, and for setting a parameter on a `java.sql.PreparedStatement` using a `com.google.cloud.spanner.Value` instance. Fixes #452 build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.1.2 (#451) deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.4.0 (#453) chore: remove unused statements file (#458) The ClientSideStatements.json file has been moved to the Connection API in the client library and is not needed in the JDBC driver. chore: release 2.0.3-SNAPSHOT (#442) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> chore: adding cloud-rad java xrefs (#461) Source-Author: Emily Ball <[email protected]> Source-Date: Thu May 6 11:48:47 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: 046994f491c02806aea60118e214a9edd67f5ab7 Source-Link: https://github.com/googleapis/synthtool/commit/046994f491c02806aea60118e214a9edd67f5ab7 deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 (#463) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `1.0.0` -> `1.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.1.0/compatibility-slim/1.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.1.0/confidence-slim/1.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-shared-dependencies</summary> [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v1.0.0...v1.1.0) - update dependency com.google.protobuf:protobuf-bom to v3.16.0 ([#&#8203;348](https://www.github.com/googleapis/java-shared-dependencies/issues/348)) ([0aacfde](https://www.github.com/googleapis/java-shared-dependencies/commit/0aacfdeec70e30803734db8287c47e4fad5481ef)) - update gax.version to v1.64.0 ([#&#8203;345](https://www.github.com/googleapis/java-shared-dependencies/issues/345)) ([478bd35](https://www.github.com/googleapis/java-shared-dependencies/commit/478bd35296293e81c7e70157f50bfbebdc1bb54d)) - update iam.version to v1.0.13 ([#&#8203;343](https://www.github.com/googleapis/java-shared-dependencies/issues/343)) ([3637923](https://www.github.com/googleapis/java-shared-dependencies/commit/363792392b71deff5cc5731104b631122fba5e61)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore(deps): update dependency com.google.cloud:libraries-bom to v20.3.0 (#462) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.2.0` -> `20.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/compatibility-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.3.0/confidence-slim/20.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). build(java): remove codecov action (#465) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8e8c0070-26ea-4d86-b07a-e4dcc9e5b8b1/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/4f4b1b9b8d8b52f1e9e4a76165896debce5ab7f1 chore(deps): update dependency com.google.cloud:libraries-bom to v20.4.0 (#466) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.3.0` -> `20.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/compatibility-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/confidence-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: add changelog to cloud-rad (#467) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/41862329-45d0-4225-9ed2-ad5a75997ae8/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/c86c7a60985644eab557949363a38301d40d78d2 tests: fixes jdbc query options test (#468) * tests: fixes jdbc query options test This test was failing, because we were no longer recreating the jdbc connection from scratch. One of the tests, set an environment variable specifying the optimizer version, which was permanently applied, since the connection was not re-created. Here we make sure to start / stop the static server before each test. * chore: fixes linting errors tests: fixes sql script test (#469) In version 6.4.4 of spanner we have change the verifyStatementsInFile method to wrap any SQLExceptions into SpannerExceptions. In the failing tests we were catching SQLExceptions and ignoring them, since they were expected. We have changed the tests to also ignore the respective SpannerExceptions. deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.4.4 (#464) chore: release 2.1.0 (#460) :robot: I have created a release \*beep\* \*boop\* --- * allow get/set Spanner Value instances ([#454](https://www.github.com/googleapis/java-spanner-jdbc/issues/454)) ([d6935b8](https://www.github.com/googleapis/java-spanner-jdbc/commit/d6935b863349c58cfdd44d6ce20dba6f5dbc1472)), closes [#452](https://www.github.com/googleapis/java-spanner-jdbc/issues/452) * NPE was thrown when getting an array of structs from a ResultSet ([#445](https://www.github.com/googleapis/java-spanner-jdbc/issues/445)) ([1dfb37b](https://www.github.com/googleapis/java-spanner-jdbc/commit/1dfb37b27ee661718fe80be0bf260c40f4b15582)), closes [#444](https://www.github.com/googleapis/java-spanner-jdbc/issues/444) * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#463](https://www.github.com/googleapis/java-spanner-jdbc/issues/463)) ([f148c71](https://www.github.com/googleapis/java-spanner-jdbc/commit/f148c71bef2b762d7b4475ba7f28443c7938c394)) * update dependency com.google.cloud:google-cloud-spanner-bom to v6.4.0 ([#453](https://www.github.com/googleapis/java-spanner-jdbc/issues/453)) ([7dac8b3](https://www.github.com/googleapis/java-spanner-jdbc/commit/7dac8b3e43625aa28be214bd735fc3386770de04)) * update dependency com.google.cloud:google-cloud-spanner-bom to v6.4.4 ([#464](https://www.github.com/googleapis/java-spanner-jdbc/issues/464)) ([eeb31c0](https://www.github.com/googleapis/java-spanner-jdbc/commit/eeb31c050fda116203d9da5c4a80c7f1c6a6cac4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore: release 2.1.1-SNAPSHOT (#470) :robot: I have created a release \*beep\* \*boop\* --- --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore(deps): update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.1.0 (#471) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner-jdbc](https://togithub.com/googleapis/java-spanner-jdbc) | `2.0.2` -> `2.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.1.0/compatibility-slim/2.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.1.0/confidence-slim/2.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-spanner-jdbc</summary> [Compare Source](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.0.2...v2.1.0) - allow get/set Spanner Value instances ([#&#8203;454](https://www.github.com/googleapis/java-spanner-jdbc/issues/454)) ([d6935b8](https://www.github.com/googleapis/java-spanner-jdbc/commit/d6935b863349c58cfdd44d6ce20dba6f5dbc1472)), closes [#&#8203;452](https://www.github.com/googleapis/java-spanner-jdbc/issues/452) - NPE was thrown when getting an array of structs from a ResultSet ([#&#8203;445](https://www.github.com/googleapis/java-spanner-jdbc/issues/445)) ([1dfb37b](https://www.github.com/googleapis/java-spanner-jdbc/commit/1dfb37b27ee661718fe80be0bf260c40f4b15582)), closes [#&#8203;444](https://www.github.com/googleapis/java-spanner-jdbc/issues/444) - update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#&#8203;463](https://www.github.com/googleapis/java-spanner-jdbc/issues/463)) ([f148c71](https://www.github.com/googleapis/java-spanner-jdbc/commit/f148c71bef2b762d7b4475ba7f28443c7938c394)) - update dependency com.google.cloud:google-cloud-spanner-bom to v6.4.0 ([#&#8203;453](https://www.github.com/googleapis/java-spanner-jdbc/issues/453)) ([7dac8b3](https://www.github.com/googleapis/java-spanner-jdbc/commit/7dac8b3e43625aa28be214bd735fc3386770de04)) - update dependency com.google.cloud:google-cloud-spanner-bom to v6.4.4 ([#&#8203;464](https://www.github.com/googleapis/java-spanner-jdbc/issues/464)) ([eeb31c0](https://www.github.com/googleapis/java-spanner-jdbc/commit/eeb31c050fda116203d9da5c4a80c7f1c6a6cac4)) - release scripts from issuing overlapping phases ([#&#8203;434](https://www.github.com/googleapis/java-spanner-jdbc/issues/434)) ([b2eec0f](https://www.github.com/googleapis/java-spanner-jdbc/commit/b2eec0f079e64f5c21b89bbc0b02e3e981d6469a)) - typo ([#&#8203;431](https://www.github.com/googleapis/java-spanner-jdbc/issues/431)) ([a0b158b](https://www.github.com/googleapis/java-spanner-jdbc/commit/a0b158bf9931d610779dec51ca61107078e9398e)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#&#8203;438](https://www.github.com/googleapis/java-spanner-jdbc/issues/438)) ([aa56b5c](https://www.github.com/googleapis/java-spanner-jdbc/commit/aa56b5c1d5e3b1ccdaa0d5b877deccbda5aa0061)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#&#8203;441](https://www.github.com/googleapis/java-spanner-jdbc/issues/441)) ([df7f0e7](https://www.github.com/googleapis/java-spanner-jdbc/commit/df7f0e796c03f9607e57b4b6ba999c92ea14c58d)) - update dependency com.google.cloud:google-cloud-spanner-bom to v6.2.1 ([#&#8203;430](https://www.github.com/googleapis/java-spanner-jdbc/issues/430)) ([212d9d0](https://www.github.com/googleapis/java-spanner-jdbc/commit/212d9d05c4f28ade71ab5484792188b11a5bcd8b)) - update dependency com.google.cloud:google-cloud-spanner-bom to v6.3.3 ([#&#8203;439](https://www.github.com/googleapis/java-spanner-jdbc/issues/439)) ([a128c4c](https://www.github.com/googleapis/java-spanner-jdbc/commit/a128c4cbe0e6b66f9276b71f7733a46645186e88)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.0 ([#&#8203;423](https://www.github.com/googleapis/java-spanner-jdbc/issues/423)) ([e0cf14a](https://www.github.com/googleapis/java-spanner-jdbc/commit/e0cf14a4dd087532924f49bb8e0431e1d681c7e8)) - update dependency com.google.cloud:google-cloud-spanner-bom to v6.2.0 ([#&#8203;420](https://www.github.com/googleapis/java-spanner-jdbc/issues/420)) ([fdd8809](https://www.github.com/googleapis/java-spanner-jdbc/commit/fdd880943394e4760c26eadc3a87d5a298591eb1)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). feat: add `gcf-owl-bot[bot]` to `ignoreAuthors` (#474) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/35db7954-f063-42f8-9ff3-5d189e94e5d3/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/7332178a11ddddc91188dc0f25bca1ccadcaa6c6 deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 (#473) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `1.1.0` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.2.0/compatibility-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.2.0/confidence-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-shared-dependencies</summary> [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v1.1.0...v1.2.0) - update dependency com.google.api-client:google-api-client-bom to v1.31.5 ([#&#8203;353](https://www.github.com/googleapis/java-shared-dependencies/issues/353)) ([8d72ab0](https://www.github.com/googleapis/java-shared-dependencies/commit/8d72ab003e08c864aedc17fc190ba26f393bf0c7)) - update dependency com.google.errorprone:error_prone_annotations to v2.7.1 ([#&#8203;360](https://www.github.com/googleapis/java-shared-dependencies/issues/360)) ([8f952d0](https://www.github.com/googleapis/java-shared-dependencies/commit/8f952d05745358fc426a1a2dcb688da5d5010239)) - update dependency com.google.protobuf:protobuf-bom to v3.17.0 ([#&#8203;355](https://www.github.com/googleapis/java-shared-dependencies/issues/355)) ([09858fb](https://www.github.com/googleapis/java-shared-dependencies/commit/09858fb4f1b78a77e828501597d20df4db0ebfcf)) - update dependency io.grpc:grpc-bom to v1.37.1 ([#&#8203;359](https://www.github.com/googleapis/java-shared-dependencies/issues/359)) ([bc9869e](https://www.github.com/googleapis/java-shared-dependencies/commit/bc9869e914314f951afd69f2acae95c414398f43)) - update google.common-protos.version to v2.2.1 ([#&#8203;358](https://www.github.com/googleapis/java-shared-dependencies/issues/358)) ([a3ed764](https://www.github.com/googleapis/java-shared-dependencies/commit/a3ed764a0e5143ee323d4b69c9747b8265d349e2)) - update iam.version to v1.0.14 ([#&#8203;352](https://www.github.com/googleapis/java-shared-dependencies/issues/352)) ([bea9a01](https://www.github.com/googleapis/java-shared-dependencies/commit/bea9a01788ac1332a4bc7e06574ef5701700fe90)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: regenerate README (#472) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2021-05-18 19:34:16,960 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-05-18 19:34:18,292 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/572b047a-da68-49ed-98fa-b98e7f88514a/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) build(deps): update dependency com.google.cloud:google-cloud-shared-config to v0.12.0 (#476) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `0.11.2` -> `0.12.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.12.0/compatibility-slim/0.11.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.12.0/confidence-slim/0.11.2)](https://docs.renovatebot.com/merge-confidence/) | --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: dump maven version along with java (#477) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9ea9dfcf-fef7-472c-9ebc-755e62e086c4/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/8eae0234a16b26c2ff616d305dbd9786c8b10a47 docs: document connection properties in README (#478) Adds documentation for the supported connection properties to the README file. Fixes #456 chore: regenerate README (#481) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2021-05-24 05:37:24,863 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-05-24 05:37:26,075 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/5da15a47-718f-4374-b505-dead2c234c76/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.3.0 (#480) chore(deps): update dependency com.google.cloud:libraries-bom to v20.5.0 (#482) deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.5.0 (#483) test(deps): update dependency com.google.truth:truth to v1.1.3 (#484) test(deps): update dependency com.google.truth:truth to v1.1.3 (#485) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.truth:truth | `1.1.2` -> `1.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/compatibility-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.3/confidence-slim/1.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: release 2.2.0 (#475) :robot: I have created a release \*beep\* \*boop\* --- * add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#474](https://www.github.com/googleapis/java-spanner-jdbc/issues/474)) ([c14f17b](https://www.github.com/googleapis/java-spanner-jdbc/commit/c14f17b411b15e778a68ce998de04732b159d7ac)) * document connection properties in README ([#478](https://www.github.com/googleapis/java-spanner-jdbc/issues/478)) ([3ccc543](https://www.github.com/googleapis/java-spanner-jdbc/commit/3ccc5433bec261b18d2536b04590e7645e47ed9b)), closes [#456](https://www.github.com/googleapis/java-spanner-jdbc/issues/456) * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#473](https://www.github.com/googleapis/java-spanner-jdbc/issues/473)) ([a6cc069](https://www.github.com/googleapis/java-spanner-jdbc/commit/a6cc0697ed5916c665f007a1bf16660b8b91f9f9)) * update dependency com.google.cloud:google-cloud-spanner-bom to v6.5.0 ([#483](https://www.github.com/googleapis/java-spanner-jdbc/issues/483)) ([e7fec30](https://www.github.com/googleapis/java-spanner-jdbc/commit/e7fec30f2f2c5518821d5348d448f102301d65c3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore: release 2.2.1-SNAPSHOT (#487) :robot: I have created a release \*beep\* \*boop\* --- --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore(deps): update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.2.0 (#488) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner-jdbc](https://togithub.com/googleapis/java-spanner-jdbc) | `2.1.0` -> `2.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.2.0/compatibility-slim/2.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-jdbc/2.2.0/confidence-slim/2.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-spanner-jdbc</summary> [Compare Source](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.1.0...v2.2.0) - add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#&#8203;474](https://www.github.com/googleapis/java-spanner-jdbc/issues/474)) ([c14f17b](https://www.github.com/googleapis/java-spanner-jdbc/commit/c14f17b411b15e778a68ce998de04732b159d7ac)) - document connection properties in README ([#&#8203;478](https://www.github.com/googleapis/java-spanner-jdbc/issues/478)) ([3ccc543](https://www.github.com/googleapis/java-spanner-jdbc/commit/3ccc5433bec261b18d2536b04590e7645e47ed9b)), closes [#&#8203;456](https://www.github.com/googleapis/java-spanner-jdbc/issues/456) - update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#&#8203;473](https://www.github.com/googleapis/java-spanner-jdbc/issues/473)) ([a6cc069](https://www.github.com/googleapis/java-spanner-jdbc/commit/a6cc0697ed5916c665f007a1bf16660b8b91f9f9)) - update dependency com.google.cloud:google-cloud-spanner-bom to v6.5.0 ([#&#8203;483](https://www.github.com/googleapis/java-spanner-jdbc/issues/483)) ([e7fec30](https://www.github.com/googleapis/java-spanner-jdbc/commit/e7fec30f2f2c5518821d5348d448f102301d65c3)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: regenerate README (#489) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2021-06-02 20:28:22,584 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-06-02 20:28:23,968 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/f9c652de-b905-42d2-8dff-d97f0e0d5476/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v1.3.0 (#490) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `1.2.0` -> `1.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.3.0/compatibility-slim/1.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.3.0/confidence-slim/1.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-shared-dependencies</summary> [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v1.2.0...v1.3.0) - add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#&#8203;365](https://www.github.com/googleapis/java-shared-dependencies/issues/365)) ([7e8309b](https://www.github.com/googleapis/java-shared-dependencies/commit/7e8309bf67ade0fe2b09f792848136cd88b4d2e4)) - update dependency com.google.auth:google-auth-library-bom to v0.26.0 ([#&#8203;368](https://www.github.com/googleapis/java-shared-dependencies/issues/368)) ([38256a8](https://www.github.com/googleapis/java-shared-dependencies/commit/38256a82cb6896c3f5e5ea6ca5d8d671c412bf84)) - update dependency com.google.cloud:google-cloud-core-bom to v1.95.0 ([#&#8203;377](https://www.github.com/googleapis/java-shared-dependencies/issues/377)) ([297ea62](https://www.github.com/googleapis/java-shared-dependencies/commit/297ea621e02f8c0679c8b07ed399d11eaacecc14)) - update dependency com.google.code.gson:gson to v2.8.7 ([#&#8203;370](https://www.github.com/googleapis/java-shared-dependencies/issues/370)) ([cdc1b8e](https://www.github.com/googleapis/java-shared-dependencies/commit/cdc1b8ea1c93f97b712081ca8dc8ea57f342b69e)) - update dependency com.google.protobuf:protobuf-bom to v3.17.1 ([#&#8203;369](https://www.github.com/googleapis/java-shared-dependencies/issues/369)) ([5a19574](https://www.github.com/googleapis/java-shared-dependencies/commit/5a19574bc626bb3c6b573ed1d177e8907188dec1)) - update dependency com.google.protobuf:protobuf-bom to v3.17.2 ([#&#8203;374](https://www.github.com/googleapis/java-shared-dependencies/issues/374)) ([83516e6](https://www.github.com/googleapis/java-shared-dependencies/commit/83516e691b99e5e5d22d27e561781a5ade5fb514)) - update dependency io.grpc:grpc-bom to v1.38.0 ([#&#8203;364](https://www.github.com/googleapis/java-shared-dependencies/issues/364)) ([00db570](https://www.github.com/googleapis/java-shared-dependencies/commit/00db5701c3b0aa609f3778c06911a9a0248ca342)) - update gax.version to v1.65.0 ([#&#8203;376](https://www.github.com/googleapis/java-shared-dependencies/issues/376)) ([b793a0d](https://www.github.com/googleapis/java-shared-dependencies/commit/b793a0d7744ff1b0f8ae5d3d13ec4776ae8d3089)) - update google.common-protos.version to v2.3.1 ([#&#8203;366](https://www.github.com/googleapis/java-shared-dependencies/issues/366)) ([7d6a7fa](https://www.github.com/googleapis/java-shared-dependencies/commit/7d6a7fa7a2cad2b3f2ecf45e42d2ed5db0b60a43)) - update google.common-protos.version to v2.3.2 ([#&#8203;375](https://www.github.com/googleapis/java-shared-dependencies/issues/375)) ([68a47ad](https://www.github.com/googleapis/java-shared-dependencies/commit/68a47ad3243f3e980db74c9c8505a1b3063c131b)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: release 2.2.1 (#491) :robot: I have created a release \*beep\* \*boop\* --- * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.3.0 ([#490](https://www.github.com/googleapis/java-spanner-jdbc/issues/490)) ([bf0c9d6](https://www.github.com/googleapis/java-spanner-jdbc/commit/bf0c9d6bf612b50a59ea2d530430ccace79aaf35)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore: release 2.2.2-SNAPSHOT (#492) :robot: I have created a release \*beep\* \*boop\* --- --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore(deps): update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.2.1 (#493) chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.23 (#494) chore: regenerate README (#495) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2021-06-05 09:53:24,030 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-06-05 09:53:25,229 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/2c57a5bd-142d-430b-9931-a1a1a7e59a30/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) chore(deps): update dependency com.google.cloud:libraries-bom to v20.6.0 (#496) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.5.0` -> `20.6.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/compatibility-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/confidence-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.6.0 (#498) * deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.6.0 Updates to Spanner client 6.6.0 and adds tests for optimizer stats package. Replaces #497 * test: implement missing method for integration test chore: release 2.2.2 (#499) :robot: I have created a release \*beep\* \*boop\* --- * update dependency com.google.cloud:google-cloud-spanner-bom to v6.6.0 ([#498](https://www.github.com/googleapis/java-spanner-jdbc/issues/498)) ([5849a97](https://www.github.com/googleapis/java-spanner-jdbc/commit/5849a970087d3fa1d1b42092b4568602563a1dbd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore: release 2.2.3-SNAPSHOT (#500) :robot: I have created a release \*beep\* \*boop\* --- --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.6.1 (#502) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner-bom](https://togithub.com/googleapis/java-spanner) | `6.6.0` -> `6.6.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.6.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.6.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.6.1/compatibility-slim/6.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.6.1/confidence-slim/6.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-spanner</summary> [Compare Source](https://togithub.com/googleapis/java-spanner/compare/v6.6.0...v6.6.1) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: release 2.2.3 (#504) :robot: I have created a release \*beep\* \*boop\* --- * update dependency com.google.cloud:google-cloud-spanner-bom to v6.6.1 ([#502](https://www.github.com/googleapis/java-spanner-jdbc/issues/502)) ([41a9cd4](https://www.github.com/googleapis/java-spanner-jdbc/commit/41a9cd49fed468f410ad226555f7b9ba46d857b3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore: regenerate README (#505) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2021-06-15 21:17:11,110 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-06-15 21:17:12,273 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/0bc6fb82-3b4e-44b2-978c-65fa57b88268/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) chore: release 2.2.4-SNAPSHOT (#507) :robot: I have created a release \*beep\* \*boop\* --- --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). fix: Update dependencies.sh to not break on mac (#506) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/f853e0b6-9a6b-4346-9a07-ff7c7ec6f858/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/8f76a885deaaf2fe234daeba4a8cc4d1b3de8086 chore(deps): update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.2.2 (#501) chore: regenerate README (#510) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2021-06-15 23:11:37,759 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-06-15 23:11:38,999 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ``` </details> Full log will be available here: https://source.cloud.google.com/results/invocations/61cfb5e0-68cd-47b3-89b4-af4a25c2c4b6/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) fix: prevent relocating urls that start with com like /computeMetadata/ (#511) Fixes #503 In addition to original problem I have added an exception for all the Netty libraries since I have got errors on service provider which claims that netty libraries are not a subtype. chore(deps): update dependency com.google.cloud:google-cloud-spanner-jdbc to v2.2.3 (#509) chore: minimize noise from build scripts (#512) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/88f2626c-4d2d-42a7-9d16-aaa685eaa74a/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/1c0c698705e668ccb3d68556ae7260f16ce63a6e fix: Add `shopt -s nullglob` to dependencies script (#514) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/bc91c2d7-c025-42b9-ab03-f02a01c15622/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/87254ac89a9559864c0a245d6b150406439ce3d8 chore(deps): update dependency com.google.cloud:libraries-bom to v20.7.0 (#515) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.6.0` -> `20.7.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/compatibility-slim/20.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.7.0/confidence-slim/20.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.7.0 (#513) deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v1.4.0 (#518) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `1.3.0` -> `1.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.4.0/compatibility-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/1.4.0/confidence-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-shared-dependencies</summary> [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v1.3.0...v1.4.0) - add grpc-gcp to dependencyManagement ([#&#8203;389](https://www.github.com/googleapis/java-shared-dependencies/issues/389)) ([57fd2e6](https://www.github.com/googleapis/java-shared-dependencies/commit/57fd2e646e28e37e0b5e4e1b37425d4897a8776f)) - Add `shopt -s nullglob` to dependencies script ([#&#8203;392](https://www.github.com/googleapis/java-shared-dependencies/issues/392)) ([f8f29df](https://www.github.com/googleapis/java-shared-dependencies/commit/f8f29df1c9cc6eca517c99113fb9509fd611ac92)) - Add common httpclient and oauth dependencies ([#&#8203;391](https://www.github.com/googleapis/java-shared-dependencies/issues/391)) ([09660e1](https://www.github.com/googleapis/java-shared-dependencies/commit/09660e1e50c96dcd7df4e80d8ad357f8256eda6c)) - Update dependencies.sh to not break on mac ([#&#8203;384](https://www.github.com/googleapis/java-shared-dependencies/issues/384)) ([0ae2841](https://www.github.com/googleapis/java-shared-dependencies/commit/0ae2841d7ce2885d041795c58a38d2d3973c2e5a)) - update dependency com.google.api-client:google-api-client-bom to v1.32.1 ([#&#8203;390](https://www.github.com/googleapis/java-shared-dependencies/issues/390)) ([00288c1](https://www.github.com/googleapis/java-shared-dependencies/commit/00288c18d09616582c8bec961ecc5c00ef1d4288)) - update dependency com.google.api:api-common to v1.10.4 ([#&#8203;385](https://www.github.com/googleapis/java-shared-dependencies/issues/385)) ([5f2b39b](https://www.github.com/googleapis/java-shared-dependencies/commit/5f2b39b5bdc4cec9d5ab2f050e11000ed372d057)) - update dependency com.google.api:gax-grpc to v1.65.1 ([#&#8203;382](https://www.github.com/googleapis/java-shared-dependencies/issues/382)) ([a2a1547](https://www.github.com/googleapis/java-shared-dependencies/commit/a2a15471dee21207a0b97b3bc8f6f59d6a4a2d13)) - update dependency com.google.protobuf:protobuf-bom to v3.17.3 ([#&#8203;379](https://www.github.com/googleapis/java-shared-dependencies/issues/379)) ([6f43eb5](https://www.github.com/googleapis/java-shared-dependencies/commit/6f43eb553dca98140d343bee3f1003096d79ee6c)) - update dependency io.grpc:grpc-bom to v1.38.1 ([#&#8203;386](https://www.github.com/googleapis/java-shared-dependencies/issues/386)) ([7b1d4cf](https://www.github.com/googleapis/java-shared-dependencies/commit/7b1d4cf317fbd75b91d6a63f82b5fc2f46eaf3ca)) - update dependency io.grpc:grpc-bom to v1.39.0 ([#&#8203;394](https://www.github.com/googleapis/java-shared-dependencies/issues/394)) ([ebc8af6](https://www.github.com/googleapis/java-shared-dependencies/commit/ebc8af6b3f850b58b35d9720a7a0b1545d4616bd)) - update gax.version to v1.66.0 ([#&#8203;395](https://www.github.com/googleapis/java-shared-dependencies/issues/395)) ([c73f73e](https://www.github.com/googleapis/java-shared-dependencies/commit/c73f73e84740a8117be342a66e179eaf3e29c6fd)) - update google.core.version to v1.95.1 ([#&#8203;381](https://www.github.com/googleapis/java-shared-dependencies/issues/381)) ([4496153](https://www.github.com/googleapis/java-shared-dependencies/commit/44961532f621b0ab19e9e7feebb7d588aef5d423)) - update google.core.version to v1.95.2 ([#&#8203;383](https://www.github.com/googleapis/java-shared-dependencies/issues/383)) ([7216859](https://www.github.com/googleapis/java-shared-dependencies/commit/7216859bcd67fa1ce1119831c33c50a2d5b79324)) - update google.core.version to v1.95.3 ([#&#8203;388](https://www.github.com/googleapis/java-shared-dependencies/issues/388)) ([354e4e8](https://www.github.com/googleapis/java-shared-dependencies/commit/354e4e811f4ba886406681a4261ac0455a9eb2d2)) - update google.core.version to v1.95.4 ([#&#8203;393](https://www.github.com/googleapis/java-shared-dependencies/issues/393)) ([be78ad8](https://www.github.com/googleapis/java-shared-dependencies/commit/be78ad85e31d8876eabafee7aa8242712573cb46)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.8.0 (#517) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner-bom](https://togithub.com/googleapis/java-spanner) | `6.7.0` -> `6.8.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.8.0/compatibility-slim/6.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.8.0/confidence-slim/6.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-spanner</summary> [Compare Source](https://togithub.com/googleapis/java-spanner/compare/v6.7.0...v6.8.0) - add gRPC-GCP channel pool as an option ([#&#8203;1227](https://www.github.com/googleapis/java-spanner/issues/1227)) ([1fa95a9](https://www.github.com/googleapis/java-spanner/commit/1fa95a9993ea8c7a5f943ab39eced4ced4cb87e7)) - spanner JSON type ([#&#8203;1260](https://www.github.com/googleapis/java-spanner/issues/1260)) ([b2a56c6](https://www.github.com/googleapis/java-spanner/commit/b2a56c68695b6209e20f9f86d83d7c5a0f39c7a8)) - Add `shopt -s nullglob` to dependencies script ([#&#8203;1256](https://www.github.com/googleapis/java-spanner/issues/1256)) ([d1712f7](https://www.github.com/googleapis/java-spanner/commit/d1712f7c51752c2359045e5eabac8fc0530a2421)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: release 2.2.4 (#508) :robot: I have created a release \*beep\* \*boop\* --- * Add `shopt -s nullglob` to dependencies script ([#514](https://www.github.com/googleapis/java-spanner-jdbc/issues/514)) ([ae51b24](https://www.github.com/googleapis/java-spanner-jdbc/commit/ae51b241148606ffddeb0a703b853de67710e48b)) * prevent relocating urls that start with com like /computeMetadata/ ([#511](https://www.github.com/googleapis/java-spanner-jdbc/issues/511)) ([1178a1d](https://www.github.com/googleapis/java-spanner-jdbc/commit/1178a1d35b4b0032acf71b3dbf862d4f9fb9399c)) * Update dependencies.sh to not break on mac ([#506](https://www.github.com/googleapis/java-spanner-jdbc/issues/506)) ([e205c0c](https://www.github.com/googleapis/java-spanner-jdbc/commit/e205c0c8eba6ac23d747c433b42d8e2365528bd8)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v1.4.0 ([#518](https://www.github.com/googleapis/java-spanner-jdbc/issues/518)) ([045b858](https://www.github.com/googleapis/java-spanner-jdbc/commit/045b8586a7ca7b0e2bd341b27ca3e8a3530c992a)) * update dependency com.google.cloud:google-cloud-spanner-bom to v6.7.0 ([#513](https://www.github.com/googleapis/java-spanner-jdbc/issues/513)) ([e1affe3](https://www.github.com/googleapis/java-spanner-jdbc/commit/e1affe358a812a45b9d2c0c9ccd0b00e3aa3791e)) * update dependency com.google.cloud:google-cloud-spanner-bom to v6.8.0 ([#517](https://www.github.com/googleapis/java-spanner-jdbc/issues/517)) ([c9013ff](https://www.github.com/googleapis/java-spanner-jdbc/commit/c9013ff48269b158121e4c65c545be30752c31fb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore: release 2.2.5-SNAPSHOT (#519) :robot: I have created a release \*beep\* \*boop\* --- --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). deps: update dependency com.google.cloud:google-cloud-spanner-bom to v6.9.0 (#521) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-spanner-bom](https://togithub.com/googleapis/java-spanner) | `6.8.0` -> `6.9.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.9.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.9.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.9.0/compatibility-slim/6.8.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-spanner-bom/6.9.0/confidence-slim/6.8.0)](https://docs.renovatebot.com/merge-confidence/) | --- <details> <summary>googleapis/java-spanner</summary> [Compare Source](https://togithub.com/googleapis/java-spanner/compare/v6.8.0...v6.9.0) - add support for tagging to Connection API ([#&#8203;623](https://www.github.com/googleapis/java-spanner/issues/623)) ([5722372](https://www.github.com/googleapis/java-spanner/commit/5722372b7869828e372dec06e80e5b0e7280af61)) - **spanner:** add leader_options to InstanceConfig and default_leader to Database ([#&#8203;1271](https://www.github.com/googleapis/java-spanner/issues/1271)) ([f257671](https://www.github.com/googleapis/java-spanner/commit/f25767144344f0df67662f1b3ef662902384599a)) - support setting an async executor provider ([#&#8203;1263](https://www.github.com/googleapis/java-spanner/issues/1263)) ([369c8a7](https://www.github.com/googleapis/java-spanner/commit/369c8a771ec48fa1476236f800b0e8eb5982a33c)) - update dependency com.google.cloud:google-cloud-shared-dependencies to v1.4.0 ([#&#8203;1269](https://www.github.com/googleapis/java-spanner/issues/1269)) ([025e162](https://www.github.com/googleapis/java-spanner/commit/025e162813d6321dabe49e32f00934f9ae334e24)) </details> --- 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-spanner-jdbc). chore: release 2.2.5 (#522) :robot: I have created a release \*beep\* \*boop\* --- * update dependency com.google.cloud:google-cloud-spanner-bom to v6.9.0 ([#521](https://www.github.com/googleapis/java-spanner-jdbc/issues/521)) ([8d840ac](https://www.github.com/googleapis/java-spanner-jdbc/commit/8d840ac855f4466c1d53a3b38d964e213708e5e5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). chore: regenerate README (#523) This PR was generated using Autosynth. :rainbow: <details><summary>Log from Synthtool</summary> ``` 2021-07-06 00:20:39,365 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-spanner-jdbc/.github/readme/synth.py. On br…
1 parent 882f8c2 commit ca1c906

18 files changed

+578
-126
lines changed

src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcWrapper.java

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static int extractColumnType(Type type) {
4848
if (type.equals(Type.int64())) return Types.BIGINT;
4949
if (type.equals(Type.numeric())) return Types.NUMERIC;
5050
if (type.equals(Type.string())) return Types.NVARCHAR;
51+
if (type.equals(Type.json())) return Types.NVARCHAR;
5152
if (type.equals(Type.timestamp())) return Types.TIMESTAMP;
5253
if (type.getCode() == Code.ARRAY) return Types.ARRAY;
5354
return Types.OTHER;
@@ -106,6 +107,7 @@ static String getClassName(Type type) {
106107
if (type == Type.int64()) return Long.class.getName();
107108
if (type == Type.numeric()) return BigDecimal.class.getName();
108109
if (type == Type.string()) return String.class.getName();
110+
if (type == Type.json()) return String.class.getName();
109111
if (type == Type.timestamp()) return Timestamp.class.getName();
110112
if (type.getCode() == Code.ARRAY) {
111113
if (type.getArrayElementType() == Type.bool()) return Boolean[].class.getName();
@@ -115,6 +117,7 @@ static String getClassName(Type type) {
115117
if (type.getArrayElementType() == Type.int64()) return Long[].class.getName();
116118
if (type.getArrayElementType() == Type.numeric()) return BigDecimal[].class.getName();
117119
if (type.getArrayElementType() == Type.string()) return String[].class.getName();
120+
if (type.getArrayElementType() == Type.json()) return String[].class.getName();
118121
if (type.getArrayElementType() == Type.timestamp()) return Timestamp[].class.getName();
119122
}
120123
return null;

src/main/java/com/google/cloud/spanner/jdbc/JdbcArray.java

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.google.cloud.spanner.Struct;
2222
import com.google.cloud.spanner.Type;
2323
import com.google.cloud.spanner.Type.StructField;
24+
import com.google.cloud.spanner.Value;
2425
import com.google.cloud.spanner.ValueBinder;
2526
import com.google.common.collect.ImmutableList;
2627
import com.google.rpc.Code;
@@ -201,6 +202,9 @@ public ResultSet getResultSet(long startIndex, int count) throws SQLException {
201202
case STRING:
202203
builder = binder.to((String) value);
203204
break;
205+
case JSON:
206+
builder = binder.to(Value.json((String) value));
207+
break;
204208
case TIMESTAMP:
205209
builder = binder.to(JdbcTypeConverter.toGoogleTimestamp((Timestamp) value));
206210
break;

src/main/java/com/google/cloud/spanner/jdbc/JdbcDataType.java

+26
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,32 @@ public Type getSpannerType() {
229229
return Type.string();
230230
}
231231
},
232+
JSON {
233+
@Override
234+
public int getSqlType() {
235+
return JsonType.VENDOR_TYPE_NUMBER;
236+
}
237+
238+
@Override
239+
public Class<String> getJavaClass() {
240+
return String.class;
241+
}
242+
243+
@Override
244+
public Code getCode() {
245+
return Code.JSON;
246+
}
247+
248+
@Override
249+
public List<String> getArrayElements(ResultSet rs, int columnIndex) {
250+
return rs.getJsonList(columnIndex);
251+
}
252+
253+
@Override
254+
public Type getSpannerType() {
255+
return Type.json();
256+
}
257+
},
232258
TIMESTAMP {
233259
@Override
234260
public int getSqlType() {

src/main/java/com/google/cloud/spanner/jdbc/JdbcParameterStore.java

+58-22
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.google.cloud.ByteArray;
2020
import com.google.cloud.spanner.Statement;
2121
import com.google.cloud.spanner.Statement.Builder;
22+
import com.google.cloud.spanner.Type;
2223
import com.google.cloud.spanner.Value;
2324
import com.google.cloud.spanner.ValueBinder;
2425
import com.google.cloud.spanner.jdbc.JdbcSqlExceptionFactory.JdbcSqlExceptionImpl;
@@ -264,6 +265,7 @@ private boolean isTypeSupported(int sqlType) {
264265
case Types.NCLOB:
265266
case Types.NUMERIC:
266267
case Types.DECIMAL:
268+
case JsonType.VENDOR_TYPE_NUMBER:
267269
return true;
268270
}
269271
return false;
@@ -315,6 +317,11 @@ private boolean isValidTypeAndValue(Object value, int sqlType) {
315317
return value instanceof Clob || value instanceof Reader;
316318
case Types.NCLOB:
317319
return value instanceof NClob || value instanceof Reader;
320+
case JsonType.VENDOR_TYPE_NUMBER:
321+
return value instanceof String
322+
|| value instanceof InputStream
323+
|| value instanceof Reader
324+
|| (value instanceof Value && ((Value) value).getType().getCode() == Type.Code.JSON);
318325
}
319326
return false;
320327
}
@@ -544,30 +551,34 @@ private Builder setParamWithKnownType(ValueBinder<Builder> binder, Object value,
544551
case Types.NCHAR:
545552
case Types.NVARCHAR:
546553
case Types.LONGNVARCHAR:
554+
String stringValue;
547555
if (value instanceof String) {
548-
return binder.to((String) value);
556+
stringValue = (String) value;
549557
} else if (value instanceof InputStream) {
550-
InputStreamReader reader =
551-
new InputStreamReader((InputStream) value, StandardCharsets.US_ASCII);
552-
try {
553-
return binder.to(CharStreams.toString(reader));
554-
} catch (IOException e) {
555-
throw JdbcSqlExceptionFactory.of(
556-
"could not set string from input stream", Code.INVALID_ARGUMENT, e);
557-
}
558+
stringValue = getStringFromInputStream((InputStream) value);
558559
} else if (value instanceof Reader) {
559-
try {
560-
return binder.to(CharStreams.toString((Reader) value));
561-
} catch (IOException e) {
562-
throw JdbcSqlExceptionFactory.of(
563-
"could not set string from reader", Code.INVALID_ARGUMENT, e);
564-
}
560+
stringValue = getStringFromReader((Reader) value);
565561
} else if (value instanceof URL) {
566-
return binder.to(((URL) value).toString());
562+
stringValue = ((URL) value).toString();
567563
} else if (value instanceof UUID) {
568-
return binder.to(((UUID) value).toString());
564+
stringValue = ((UUID) value).toString();
565+
} else {
566+
throw JdbcSqlExceptionFactory.of(value + " is not a valid string", Code.INVALID_ARGUMENT);
567+
}
568+
return binder.to(stringValue);
569+
case JsonType.VENDOR_TYPE_NUMBER:
570+
String jsonValue;
571+
if (value instanceof String) {
572+
jsonValue = (String) value;
573+
} else if (value instanceof InputStream) {
574+
jsonValue = getStringFromInputStream((InputStream) value);
575+
} else if (value instanceof Reader) {
576+
jsonValue = getStringFromReader((Reader) value);
577+
} else {
578+
throw JdbcSqlExceptionFactory.of(
579+
value + " is not a valid JSON value", Code.INVALID_ARGUMENT);
569580
}
570-
throw JdbcSqlExceptionFactory.of(value + " is not a valid string", Code.INVALID_ARGUMENT);
581+
return binder.to(Value.json(jsonValue));
571582
case Types.DATE:
572583
if (value instanceof Date) {
573584
return binder.to(JdbcTypeConverter.toGoogleDate((Date) value));
@@ -652,6 +663,25 @@ private Builder setParamWithKnownType(ValueBinder<Builder> binder, Object value,
652663
return null;
653664
}
654665

666+
private String getStringFromInputStream(InputStream inputStream) throws SQLException {
667+
InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.US_ASCII);
668+
try {
669+
return CharStreams.toString(reader);
670+
} catch (IOException e) {
671+
throw JdbcSqlExceptionFactory.of(
672+
"could not set string from input stream", Code.INVALID_ARGUMENT, e);
673+
}
674+
}
675+
676+
private String getStringFromReader(Reader reader) throws SQLException {
677+
try {
678+
return CharStreams.toString(reader);
679+
} catch (IOException e) {
680+
throw JdbcSqlExceptionFactory.of(
681+
"could not set string from reader", Code.INVALID_ARGUMENT, e);
682+
}
683+
}
684+
655685
/** Set the parameter value based purely on the type of the value. */
656686
private Builder setParamWithUnknownType(ValueBinder<Builder> binder, Object value)
657687
throws SQLException {
@@ -769,14 +799,16 @@ private Builder setArrayValue(ValueBinder<Builder> binder, int type, Object valu
769799
case Types.LONGNVARCHAR:
770800
case Types.CLOB:
771801
case Types.NCLOB:
772-
return binder.toStringArray((Iterable<String>) null);
802+
return binder.toStringArray(null);
803+
case JsonType.VENDOR_TYPE_NUMBER:
804+
return binder.toJsonArray(null);
773805
case Types.DATE:
774-
return binder.toDateArray((Iterable<com.google.cloud.Date>) null);
806+
return binder.toDateArray(null);
775807
case Types.TIME:
776808
case Types.TIME_WITH_TIMEZONE:
777809
case Types.TIMESTAMP:
778810
case Types.TIMESTAMP_WITH_TIMEZONE:
779-
return binder.toTimestampArray((Iterable<com.google.cloud.Timestamp>) null);
811+
return binder.toTimestampArray(null);
780812
case Types.BINARY:
781813
case Types.VARBINARY:
782814
case Types.LONGVARBINARY:
@@ -829,7 +861,11 @@ private Builder setArrayValue(ValueBinder<Builder> binder, int type, Object valu
829861
} else if (Timestamp[].class.isAssignableFrom(value.getClass())) {
830862
return binder.toTimestampArray(JdbcTypeConverter.toGoogleTimestamps((Timestamp[]) value));
831863
} else if (String[].class.isAssignableFrom(value.getClass())) {
832-
return binder.toStringArray(Arrays.asList((String[]) value));
864+
if (type == JsonType.VENDOR_TYPE_NUMBER) {
865+
return binder.toJsonArray(Arrays.asList((String[]) value));
866+
} else {
867+
return binder.toStringArray(Arrays.asList((String[]) value));
868+
}
833869
} else if (byte[][].class.isAssignableFrom(value.getClass())) {
834870
return binder.toBytesArray(JdbcTypeConverter.toGoogleBytes((byte[][]) value));
835871
}

src/main/java/com/google/cloud/spanner/jdbc/JdbcResultSet.java

+17
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ public String getString(int columnIndex) throws SQLException {
142142
return isNull ? null : spanner.getBigDecimal(spannerIndex).toString();
143143
case STRING:
144144
return isNull ? null : spanner.getString(spannerIndex);
145+
case JSON:
146+
return isNull ? null : spanner.getJson(spannerIndex);
145147
case TIMESTAMP:
146148
return isNull ? null : spanner.getTimestamp(spannerIndex).toString();
147149
case STRUCT:
@@ -169,6 +171,7 @@ public boolean getBoolean(int columnIndex) throws SQLException {
169171
case STRING:
170172
return isNull ? false : Boolean.valueOf(spanner.getString(spannerIndex));
171173
case BYTES:
174+
case JSON:
172175
case DATE:
173176
case STRUCT:
174177
case TIMESTAMP:
@@ -198,6 +201,7 @@ public byte getByte(int columnIndex) throws SQLException {
198201
case STRING:
199202
return isNull ? (byte) 0 : checkedCastToByte(parseLong(spanner.getString(spannerIndex)));
200203
case BYTES:
204+
case JSON:
201205
case DATE:
202206
case STRUCT:
203207
case TIMESTAMP:
@@ -227,6 +231,7 @@ public short getShort(int columnIndex) throws SQLException {
227231
case STRING:
228232
return isNull ? 0 : checkedCastToShort(parseLong(spanner.getString(spannerIndex)));
229233
case BYTES:
234+
case JSON:
230235
case DATE:
231236
case STRUCT:
232237
case TIMESTAMP:
@@ -256,6 +261,7 @@ public int getInt(int columnIndex) throws SQLException {
256261
case STRING:
257262
return isNull ? 0 : checkedCastToInt(parseLong(spanner.getString(spannerIndex)));
258263
case BYTES:
264+
case JSON:
259265
case DATE:
260266
case STRUCT:
261267
case TIMESTAMP:
@@ -283,6 +289,7 @@ public long getLong(int columnIndex) throws SQLException {
283289
case STRING:
284290
return isNull ? 0L : parseLong(spanner.getString(spannerIndex));
285291
case BYTES:
292+
case JSON:
286293
case DATE:
287294
case STRUCT:
288295
case TIMESTAMP:
@@ -310,6 +317,7 @@ public float getFloat(int columnIndex) throws SQLException {
310317
case STRING:
311318
return isNull ? 0 : checkedCastToFloat(parseDouble(spanner.getString(spannerIndex)));
312319
case BYTES:
320+
case JSON:
313321
case DATE:
314322
case STRUCT:
315323
case TIMESTAMP:
@@ -337,6 +345,7 @@ public double getDouble(int columnIndex) throws SQLException {
337345
case STRING:
338346
return isNull ? 0 : parseDouble(spanner.getString(spannerIndex));
339347
case BYTES:
348+
case JSON:
340349
case DATE:
341350
case STRUCT:
342351
case TIMESTAMP:
@@ -372,6 +381,7 @@ public Date getDate(int columnIndex) throws SQLException {
372381
case INT64:
373382
case NUMERIC:
374383
case BYTES:
384+
case JSON:
375385
case STRUCT:
376386
case ARRAY:
377387
default:
@@ -396,6 +406,7 @@ public Time getTime(int columnIndex) throws SQLException {
396406
case INT64:
397407
case NUMERIC:
398408
case BYTES:
409+
case JSON:
399410
case STRUCT:
400411
case ARRAY:
401412
default:
@@ -421,6 +432,7 @@ public Timestamp getTimestamp(int columnIndex) throws SQLException {
421432
case INT64:
422433
case NUMERIC:
423434
case BYTES:
435+
case JSON:
424436
case STRUCT:
425437
case ARRAY:
426438
default:
@@ -576,6 +588,7 @@ private Object getObject(Type type, int columnIndex) throws SQLException {
576588
if (type == Type.int64()) return getLong(columnIndex);
577589
if (type == Type.numeric()) return getBigDecimal(columnIndex);
578590
if (type == Type.string()) return getString(columnIndex);
591+
if (type == Type.json()) return getString(columnIndex);
579592
if (type == Type.timestamp()) return getTimestamp(columnIndex);
580593
if (type.getCode() == Code.ARRAY) return getArray(columnIndex);
581594
throw JdbcSqlExceptionFactory.of(
@@ -664,6 +677,7 @@ private BigDecimal getBigDecimal(int columnIndex, boolean fixedScale, int scale)
664677
e);
665678
}
666679
case BYTES:
680+
case JSON:
667681
case DATE:
668682
case TIMESTAMP:
669683
case STRUCT:
@@ -749,6 +763,7 @@ public Date getDate(int columnIndex, Calendar cal) throws SQLException {
749763
case INT64:
750764
case NUMERIC:
751765
case BYTES:
766+
case JSON:
752767
case STRUCT:
753768
case ARRAY:
754769
default:
@@ -778,6 +793,7 @@ public Time getTime(int columnIndex, Calendar cal) throws SQLException {
778793
case INT64:
779794
case NUMERIC:
780795
case BYTES:
796+
case JSON:
781797
case STRUCT:
782798
case ARRAY:
783799
default:
@@ -810,6 +826,7 @@ public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
810826
case INT64:
811827
case NUMERIC:
812828
case BYTES:
829+
case JSON:
813830
case STRUCT:
814831
case ARRAY:
815832
default:

src/main/java/com/google/cloud/spanner/jdbc/JdbcTypeConverter.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ static Object convert(Object value, Type type, Class<?> targetType) throws SQLEx
8181
}
8282
if (targetType.equals(byte[].class)) {
8383
if (type.getCode() == Code.BYTES) return value;
84-
if (type.getCode() == Code.STRING) return ((String) value).getBytes(UTF8);
84+
if (type.getCode() == Code.STRING || type.getCode() == Code.JSON)
85+
return ((String) value).getBytes(UTF8);
8586
}
8687
if (targetType.equals(Boolean.class)) {
8788
if (type.getCode() == Code.BOOL) return value;
@@ -186,6 +187,8 @@ private static Value convertToSpannerValue(Object value, Type type) throws SQLEx
186187
case TIMESTAMP:
187188
return Value.timestampArray(
188189
toGoogleTimestamps((java.sql.Timestamp[]) ((java.sql.Array) value).getArray()));
190+
case JSON:
191+
return Value.jsonArray(Arrays.asList((String[]) ((java.sql.Array) value).getArray()));
189192
case STRUCT:
190193
default:
191194
throw JdbcSqlExceptionFactory.of(
@@ -207,6 +210,8 @@ private static Value convertToSpannerValue(Object value, Type type) throws SQLEx
207210
return Value.string((String) value);
208211
case TIMESTAMP:
209212
return Value.timestamp(toGoogleTimestamp((java.sql.Timestamp) value));
213+
case JSON:
214+
return Value.json((String) value);
210215
case STRUCT:
211216
default:
212217
throw JdbcSqlExceptionFactory.of(

0 commit comments

Comments
 (0)