You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract DeclaredType parsing from LibsqlResultSetMetaData #204
Collapse the declared-type parsing in LibsqlResultSetMetaData into one value object. Three regexes and four matcher blocks currently encode the same "declared type or cast fallback" idea, and each getter repeats the null and empty handling.
LibsqlResultSetMetaDataTest covers lower-case cast only, whitespace preservation in type names, malformed precision throwing NumberFormatException, and precision and scale from a parenthesized type.
Scope
Create DeclaredType with of(Col), typeName(), precision(), scale(), and isDeclared() from LibsqlResultSetMetaData 22 to 25, 160 to 184, 290 to 300, and 342 to 358.
getPrecision, getScale, getColumnTypeName, and isSigned delegate.
Preserve
getColumnTypeName preserves internal whitespace and upper-cases with Locale.ENGLISH.
getPrecision parses with Integer.parseInt and throws NumberFormatException unchecked.
getScale returns 0 unless there are exactly two comma-separated parts.
The cast fallback matches lowercase cast only and uses the original column name.
Acceptance
DeclaredType.java exists and holds the moved logic unchanged.
LibsqlResultSetMetaData.java is under 430 lines.
./mvnw -pl libsql-jdbc -am test green with no assertion edited.
Activity