Package-level declarations

Types

Link copied to clipboard
interface TypeCodec<T : Any>

Interface representing a codec that handles serialization and deserialization between a Kotlin type and a PostgreSQL binary format.

Functions

Link copied to clipboard
internal fun <T : Any> TypeCodec<T>.decodeSafely(data: ByteArray, offset: Int, length: Int): T

Safely decodes a value using this TypeCodec. Any standard exceptions (like IllegalArgumentException or IllegalStateException) thrown by the codec's TypeCodec.fromBinary method are caught and wrapped in a CodecException.

Link copied to clipboard
internal fun <T : Any> TypeCodec<T>.encodeSafely(value: T, writer: PgByteWriter)

Safely encodes a value using this TypeCodec. Any standard exceptions (like IllegalArgumentException or IllegalStateException) thrown by the codec's TypeCodec.toBinary method are caught and wrapped in a CodecException.