mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-15 14:14:20 +01:00
## Purpose * Implement `setAsciiStream(int, InputStream, int)`, `setUnicodeStream(int, InputStream, int)`, and `setBinaryStream(int, InputStream, int)` methods in JDBC4PreparedStatemen ## Changes * `setAsciiStream(int, InputStream, int)`: Reads ASCII bytes, converts to `String` using `US_ASCII` and binds with `bindText()`. * `setUnicodeStream(int, InputStream, int)`: Reads bytes as `UTF-8` encoded text and binds with `bindText()`. * `setBinaryStream(int, InputStream, int)`: Reads raw bytes and binds with `bindBlob()`. * Added consistent error handling and validation * null stream - `bindNull()` * Negative length - throws `SQLException` * Empty stream - Empty String or Empty Array * I/O errors - throw `SQLException` * Ensures consistency between `setXxxStream` and `getXxxStream` methods, so data written and read use the same encoding. ## Related Issue * #615 Reviewed-by: Kim Seon Woo (@seonWKim) Closes #3917