Repository navigation
refactor(jdbc): extract SqliteDateTimeValues - #219
Merged
Merged
Conversation
Owner
Author
|
Root verdict: PASS at fd32836. Verifier confirmed the moved methods are byte-identical, the four wave-0 date and time tests are unedited and green, and the cursor side effect is intact. A live probe on a NULL column returned null through every date getter with This completes wave 1 of the stack. |
magnusp
force-pushed
the
refactor/i201-date-time-values
branch
from
October 24, 2026 14:41
fd32836 to
e3a3eff
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.
Fixes #201
Extracts storage-class to date/time conversion from
LibsqlResultSetinto package-privateSqliteDateTimeValues(from(Value, String targetType)plusepochMillisToLocalDateTime,julianDayToEpochMillis,parseSqliteDateTime,parseSqliteTime). A thindateTimeValue(int, String)stays in the cursor layer: it still callsgetCurrentValue(columnIndex)(which setslastColumnIndex, sowasNullkeeps working) and then delegates.getLocalDate,getLocalTime, andgetLocalDateTimeare unchanged.Moved verbatim (normalized diff)
Compared the parent block (
LibsqlResultSet.javalines 795-895 at373b875: theswitchbody plus the four helpers) with the new class (frombody plus helpers), normalizing only by droppingprivatefrom the four helper signatures and trimming trailing whitespace:No parse rule, default, message, or zone changed. BLOB still throws
"Bad value for type " + targetType; blank text still returns null; bare time still defaults to2000-01-01; offsets are honored only when the sign index exceeds nine;Z/zis UTC; conversion usesZoneId.systemDefault(); exception wrapping keeps the original text; INTEGER epoch millis and REAL Julian day are untouched. No dependency,pom.xml, test, numeric-text, or LOB change.Probe
Scratch edit changed the bare-time default in the moved code from
LocalDate.of(2000, 1, 1)toLocalDate.of(1970, 1, 1):Reverted. The new file's sha256 returned to the pre-probe value
80f18b5c…,git status --porcelainlists only the two intended paths, andgit diff -- libsql-jdbc/src/testis empty, so the four wave-0 date/time tests stay green unedited.Line counts
LibsqlResultSet.java: 912 → 809 (under 850)SqliteDateTimeValues.java: 124 (new)Lanes
./mvnw -pl libsql-jdbc -am test→ 392 tests, 0 failures, 0 errors./mvnw spotless:apply, then./mvnw spotless:check→ BUILD SUCCESS both./mvnw -pl libsql-conformance -am verify→ 272 tests, 0 failures, 7 skipped