Repository navigation
fix(jdbc): report runtime storage class from getColumnType - #63
Merged
Merged
Conversation
magnusp
force-pushed
the
fix/35-runtime-storage-type
branch
from
October 21, 2026 22:12
cb8dd0a to
a6d3f55
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #35. Part of #54.
What changed
LibsqlResultSetMetaData.getColumnTypenow checks the current row's runtime storage class before consulting the declared type, following xerial 3.53.4.0JDBC3ResultSet.getColumnType(JDBC3ResultSet.java:622-721) branch by branch.LibsqlResultSet.valueForMetadata(int). It returns the value at the metadata cursor: the first row before the firstnext()(matching xerial's preloaded first row), the current row during iteration, andnullat end-of-results so declared types apply.1.5, BOOLEAN holding'true', NUMERIC and DECIMAL holding integers, NULL values, an empty result set, and type changes between rows.integerTypeandinferTypeFromValuehelpers.Contract decision
Runtime typing wins, matching xerial 3.53.4.0 and the #54 parity rule.
getColumnTypeis gated on the current row's storage class, including NUMERIC/DECIMAL holding an integer reportingINTEGER. NULL or no current row falls back to declared-type mapping, which also covers empty result sets.Evidence
Failing before the fix:
Passing after the fix:
The conformance run includes the vendored xerial
RSMetaDataTestagainst live sqld (13 tests, all passed).mise exec -- ./mvnw spotless:applycompleted with no formatting changes.Deviations
None.