DoubleCodec

internal object DoubleCodec : TypeCodec<Double>

Properties

Link copied to clipboard
open override val fromBinary: (ByteArray, Int, Int) -> Double

Function to deserialize a value from a PostgreSQL binary format.

Link copied to clipboard
open override val isDefaultForKotlinType: Boolean = true

Whether this codec is the default for its Kotlin type.

Link copied to clipboard
open override val kotlinClass: KClass<Double>

The Kotlin class this codec handles.

Link copied to clipboard
open override val oid: Int = 701

Optional OID of the PostgreSQL type.

Link copied to clipboard
open override val pgSchema: String

PostgreSQL schema name

Link copied to clipboard
open override val pgTypeName: String

PostgreSQL type name.

Link copied to clipboard
open override val toBinary: (Double, PgByteWriter) -> Unit

Function to serialize a value to 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.