Skip to content
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: allows for getting json columns using getValue #1699

Merged
merged 7 commits into from
Feb 21, 2022

Conversation

thiagotnunes
Copy link
Contributor

Allows for getting JSON values using resultSet.getValue(). This was not possible before, because a mapping was missing.

Overrides the getString method in json values to allow for getString and getStringArray on json values.

Allows for getting JSON values using resultSet.getValue().
Overrides the getString method in json values to allow for getString and
getStringArray on json values.
@thiagotnunes thiagotnunes requested a review from a team as a code owner February 18, 2022 08:47
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Feb 18, 2022

private void assertThrowsWithMessage(Supplier<?> supplier, String message) {
try {
supplier.get();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think you could also just use assertThrows(...) for this instead of a try-catch-block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can, because we match partially on the message of the exception

thiagotnunes and others added 2 commits February 19, 2022 12:54
Co-authored-by: Knut Olav Løite <koloite@gmail.com>
Co-authored-by: Knut Olav Løite <koloite@gmail.com>
@thiagotnunes thiagotnunes requested a review from a team as a code owner February 19, 2022 01:56
@@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-spanner'
If you are using Gradle without BOM, add this to your dependencies

```Groovy
implementation 'com.google.cloud:google-cloud-spanner:6.19.0'
implementation 'com.google.cloud:google-cloud-spanner:6.19.1'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This is a change from owlbot)

```

If you are using SBT, add this to your dependencies

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.19.0"
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.19.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This is a change from owlbot)

Copy link
Contributor

@ansh0l ansh0l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thiagotnunes thiagotnunes merged commit a51973b into main Feb 21, 2022
@thiagotnunes thiagotnunes deleted the json-get-value-fix branch February 21, 2022 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants