Protocol
PostgresEncodable
public protocol PostgresEncodable
A type that can encode itself to a postgres wire binary representation.
Relationships
Types Conforming to PostgresEncodable
PostgresArrayEncodable
A type, of which arrays can be encoded into and decoded from a postgres binary format
Default Implementations
psqlType
public static var psqlType: PostgresDataType
psqlFormat
public static var psqlFormat: PostgresFormat
encode(into:context:)
@inlinable
public func encode<JSONEncoder: PostgresJSONEncoder>(
into byteBuffer: inout ByteBuffer,
context: PostgresEncodingContext<JSONEncoder>
)
psqlType
public static var psqlType: PostgresDataType
psqlFormat
public static var psqlFormat: PostgresFormat
encode(into:context:)
@inlinable
public func encode<JSONEncoder: PostgresJSONEncoder>(
into byteBuffer: inout ByteBuffer,
context: PostgresEncodingContext<JSONEncoder>
) throws
psqlType
public static var psqlType: PostgresDataType
psqlFormat
public static var psqlFormat: PostgresFormat
encode(into:context:)
@inlinable
public func encode<JSONEncoder: PostgresJSONEncoder>(
into byteBuffer: inout ByteBuffer,
context: PostgresEncodingContext<JSONEncoder>
) throws
Requirements
psqlType
static var psqlType: PostgresDataType
identifies the data type that we will encode into byteBuffer
in encode
psqlFormat
static var psqlFormat: PostgresFormat
identifies the postgres format that is used to encode the value into byteBuffer
in encode
encode(into:context:)
func encode<JSONEncoder: PostgresJSONEncoder>(into byteBuffer: inout ByteBuffer, context: PostgresEncodingContext<JSONEncoder>) throws
Encode the entity into the byteBuffer
in Postgres binary format, without setting
the byte count. This method is called from the PostgresBindings
.