Structure
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.
struct PostgresEncodingContext<JSONEncoder> where JSONEncoder : PostgresJSONEncoder
Topics
Initializers
init(jsonEncoder:)Creates aPostgresEncodingContextwith the givenPostgresJSONEncoder. In case you want to use aPostgresEncodingContextwith an unconfigured FoundationJSONEncoderyou can use thedefaultcontext instead.
Instance Properties
jsonEncoderAPostgresJSONEncoderused to encode the object to JSON.
Type Properties
defaultA defaultPostgresEncodingContextthat uses a FoundationJSONEncoder.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype
See Also
Encoding
PostgresEncodableA type that can encode itself to a Postgres wire binary representation.PostgresNonThrowingEncodableA type that can encode itself to a Postgres wire binary representation. It enforces that theencode(into:context:)does not throw. This allows users to createPostgresQuerys viaExpressibleByStringInterpolationwithout having to spelltry.PostgresDynamicTypeEncodableA 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.PostgresThrowingDynamicTypeEncodableA 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.PostgresArrayEncodableA type of which arrays can be encoded into and decoded from a Postgres binary format.PostgresRangeEncodableA type that can be encoded into a Postgres range type where it is the bound type.PostgresRangeArrayEncodableA type that can be encoded into a Postgres range array type where it is the bound type.