ByteArrayEncoder

PostgreSQL-specific ValueEncoder for ByteArray.

Encodes the byte array to the PostgreSQL bytea hex input format (\xHH..). Once the returned string is wrapped as a SQL literal by the rendering layer, PostgreSQL implicitly casts it to bytea in any bytea-typed context (column assignment, comparison, explicit ::bytea cast).

Decodes a bytea column into a ByteArray by stripping the \x prefix and parsing the remaining hex.

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