Skip to content

Initializer

init(from:type:format:context:)

Create an entity from the buffer in Postgres wire format.
init<JSONDecoder>(from byteBuffer: inout ByteBuffer, type: PostgresDataType, format: PostgresFormat, context: PostgresDecodingContext<JSONDecoder>) throws where JSONDecoder : PostgresJSONDecoder

Parameters

type

The Postgres data type. Depending on this type the buffer’s bytes need to be interpreted in different ways.

format

The Postgres wire format. Can be .text or .binary.

context

A PostgresDecodingContext providing context for decoding. This includes a JSONDecoder to use when decoding JSON and metadata to create better errors.

Return Value

A decoded object.