Skip to content

Conversation

@olavloite
Copy link
Collaborator

@olavloite olavloite commented Nov 14, 2025

Adds an unknownLength connection property that can be used to configure the length that the JDBC driver should return as the data type / column length when this is not known. Spanner does not return the (maximum) length of a column in ResultSetMetadata. This means that the JDBC driver does not know what the length is of the various columns in query results.

The value of unknownLength will be returned when the getPrecision and getColumnDisplaySize methods of ResultSetMetaData are called.

This connection property aligns with the same connection parameter in the PostgreSQL JDBC driver: https://jdbc.postgresql.org/documentation/use/#connection-parameters

Adds an `unknownLength` connection property that can be used to configure the length that
the JDBC driver should return as the data type / column length when this is not known.
Spanner does not return the (maximum) length of a column in ResultSetMetadata. This means
that the JDBC driver does not know what the length is of the various columns in query results.

The value of `unknownLength` will be returned when the getPrecision and getColumnDisplaySize
methods of ResultSetMetaData are called.

This connection property aligns with the same connection parameter in the PostgreSQL JDBC driver:
https://jdbc.postgresql.org/documentation/use/#connection-parameters
@olavloite olavloite requested review from a team as code owners November 14, 2025 11:01
@olavloite olavloite added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 14, 2025
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner-jdbc API. labels Nov 14, 2025
@olavloite olavloite removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 18, 2025
@olavloite olavloite merged commit 6aceb64 into main Nov 18, 2025
28 checks passed
@olavloite olavloite deleted the unknown-length branch November 18, 2025 08:09
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. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants