ByteArrayEncoder

SQLite-specific ValueEncoder for ByteArray.

Encodes the byte array as a SQLite hexadecimal BLOB literal (X'HH..'), wrapped in SqlRawLiteral so the statement renderer emits it verbatim without re-quoting. SQLite treats X'HH..' as a BLOB, so it works as a parameter for BLOB columns, randomblob/zeroblob comparisons, and anywhere a BLOB is expected.

Decodes a SQLite BLOB/hex column into a ByteArray by parsing the hex text.

Functions

Link copied to clipboard
open override fun decode(value: ResultSet.Row.Column): ByteArray
Link copied to clipboard
open override fun encode(value: ByteArray): Any