Skip to content

Protocol

PostgresThrowingDynamicTypeEncodable

A type that can encode itself to a Postgres wire binary representation. Dynamic types are types that don’t have a well-known Postgres type OID at compile time. For example, custom types created at runtime, such as enums, or extension types whose OID is not stable between databases.
protocol PostgresThrowingDynamicTypeEncodable

Topics

Instance Properties

  • var psqlFormat: PostgresFormat
    The Postgres encoding format used to encode the value into byteBuffer in encode(into:context:).
  • var psqlType: PostgresDataType
    The data type encoded into the byteBuffer in encode(into:context:).
  • var psqlTypeName: String?
    The Postgres name of this type. This is used for types that don’t have a static OID, like types coming from extensions. The OID is looked up by name the first time the type is used on a connection, if the type can’t be found psqlType is used instead.

Instance Methods

Relationships

Inherited By

Conforming Types

See Also

Encoding

  • protocol PostgresEncodable
    A type that can encode itself to a Postgres wire binary representation.
  • protocol PostgresNonThrowingEncodable
    A type that can encode itself to a Postgres wire binary representation. It enforces that the encode(into:context:) does not throw. This allows users to create PostgresQuerys via ExpressibleByStringInterpolation without having to spell try.
  • protocol PostgresDynamicTypeEncodable
    A type that can encode itself to a Postgres wire binary representation. Dynamic types are types that don’t have a well-known Postgres type OID at compile time. For example, custom types created at runtime, such as enums, or extension types whose OID is not stable between databases.
  • protocol PostgresArrayEncodable
    A type of which arrays can be encoded into and decoded from a Postgres binary format.
  • protocol PostgresRangeEncodable
    A type that can be encoded into a Postgres range type where it is the bound type.
  • protocol PostgresRangeArrayEncodable
    A type that can be encoded into a Postgres range array type where it is the bound type.
  • struct PostgresEncodingContext
    A context that is passed to Swift objects that are encoded into the Postgres wire format. Used to pass further information to the encoding method.