Initializer
init(from:type:format:context:)
Create an entity from the
buffer in Postgres wire format.init<JSONDecoder>(from buffer: inout ByteBuffer, type: PostgresDataType, format: PostgresFormat, context: PostgresDecodingContext<JSONDecoder>) where JSONDecoder : PostgresJSONDecoder
Parameters
bufferA
ByteBufferto decode. The buffer is sliced in such a way that it is expected that the complete buffer is consumed for decoding.typeThe Postgres data type. Depending on this type the buffer’s bytes need to be interpreted in different ways.
formatThe Postgres wire format. Can be
.textor.binary.contextA
PostgresDecodingContextproviding context for decoding. This includes aJSONDecoderto use when decoding JSON and metadata to create better errors.
Return Value
A decoded object.