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: Allow using UUIDs as parameters in PreparedStatement #364

Closed
olavloite opened this issue Feb 22, 2021 · 0 comments · Fixed by #365
Closed

feat: Allow using UUIDs as parameters in PreparedStatement #364

olavloite opened this issue Feb 22, 2021 · 0 comments · Fixed by #365
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@olavloite
Copy link
Collaborator

UUIDs are one of the recommended primary key types for Cloud Spanner as they are not (necessarily) monotonically increasing and they can be generated in the client. The JDBC driver currently does not support setting a UUID directly as a parameter, but always requires the client application to translate it to a String first. This can add extra complexity to the client application.

@olavloite olavloite added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: spanner Issues related to the googleapis/java-spanner-jdbc API. labels Feb 22, 2021
@olavloite olavloite self-assigned this Feb 22, 2021
olavloite added a commit that referenced this issue Feb 22, 2021
Enables the usage of UUIDs as a parameter in PreparedStatements. UUIDs are
automatically translated to strings.

Fixes #364
olavloite added a commit that referenced this issue Mar 1, 2021
Enables the usage of UUIDs as a parameter in PreparedStatements. UUIDs are
automatically translated to strings.

Fixes #364
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-jdbc API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant