Skip to content

feat(jdbc): support JDBC4 CLOB, BLOB, ... - #130

Merged
andreaTP merged 2 commits into
roastedroot:mainfrom
poolborges:feat/jdbc4-prep-stmt-parameters
Nov 9, 2026
Merged

andreaTP merged 2 commits into
roastedroot:mainfrom
poolborges:feat/jdbc4-prep-stmt-parameters

Conversation

@poolborges

Copy link
Copy Markdown

Summary

This PR adds support for JDBC v4 parameter setters (CLOB, BLOB, NString, NClob, and character/binary streams) to JDBC4PreparedStatement.
The design is adapted from sqlite-jdbc, implemented using Java 11+ APIs for sqlite4j.

poolborges and others added 2 commits November 5, 2026 00:55
…edStatement

Adapted from original sqlite-jdbc with a concise, modern Java implementation:
- Implement concise JDBC4 CLOB, BLOB, ASCII, binary, and character stream parameter setters in JDBC4PreparedStatement
- Add support for national character types (NString, NClob, NCharacterStream) mapping to UTF-8
- Modernize stream reading and bounded character processing in JDBC3PreparedStatement
- Add comprehensive test coverage in PrepStmtTest
The null-stream branches in setBinaryStream/setUnicodeStream fell through
to readBytes, which now NPEs since it delegates to readNBytes.
@andreaTP

andreaTP commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

@poolborges sorry for the delay, I missed this one 😅 I pushed a small commit on top to fix formatting and a null-stream edge case. Thanks for the contribution!

@andreaTP
andreaTP merged commit ff42640 into roastedroot:main Nov 9, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants