Repository navigation
refactor(jdbc): extract LibsqlBlob and LibsqlClob - #217
Merged
Merged
Conversation
Characterization tests for the four unpinned behaviors in the JDBC refactor Wave 0: - attached-schema table metadata through pragma_database_list - date/time text tails (offset, Z, bare time) and BLOB rejection - duplicate savepoint names and releasing the outermost savepoint of an auto-commit-started transaction - executeBatch racing statement close Tests only; no production code, pom or dependency change.
Move the two read-only Blob and Clob implementations out of LibsqlResultSet into package-private top-level classes. Constructors become package-private so getBlob and getClob can still build them. Pure move: messages, checks, stream encodings, and free() semantics are unchanged. Also drops the four imports that only the moved code used (OutputStream, Writer, StandardCharsets, Arrays).
Owner
Author
|
Root verdict: PASS at 7e09784. Verifier proved both class bodies moved verbatim, constructors stay package-private, Coverage note for a later pass: no test calls |
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 #199
Pure move, zero behavior change. Extracts the two read-only LOB implementations from
LibsqlResultSetinto package-private top-levelLibsqlBlobandLibsqlClob, each stillfinal, with a package-private constructor sogetBlobandgetClobconstruct them as before.Base note: this PR targets
refactor/i198-sqlite-real-text, the parent stack link (real-text formatter already extracted). It is not based onmain.Diff stat
git diff --cached -- LibsqlResultSet.javahas zero added lines: every change there is a deletion.Proof the moved lines are unchanged
Old
LibsqlResultSet.java(parent head) lines 1034–1135 and 1137–1237 compared with the new files. Only the class declaration, the constructor visibility, and the closing brace differ; all method bodies, comments, messages, and checks are byte-identical.The moved bodies keep their original indentation so the relocation is byte-for-byte a move.
Preserved verbatim:
"Blob has been freed","Clob has been freed","Invalid position: ...","Invalid length: ...","Blob is read-only","Clob is read-only".SQLException/SQLFeatureNotSupportedExceptiontype and every position and length check.LibsqlBlob.free()setsbytes = null;LibsqlClob.free()setstext = null.LibsqlClob.getAsciiStream()still encodes withStandardCharsets.US_ASCII.The only other edit in
LibsqlResultSetis removing the four imports that only the moved code used (OutputStream,Writer,StandardCharsets,Arrays).ByteArrayInputStream,InputStream,Reader,StringReader,Blob, andClobare still used by the result set.Line counts
LibsqlResultSet.javaLibsqlBlob.javaLibsqlClob.javaNo nested
LibsqlBloborLibsqlClobremains inLibsqlResultSet. Nothing else inLibsqlResultSetmoved.Lanes
No test file, dependency, or
pom.xmlchange. No public surface change.