Protocol
PostgresRangeDecodable
A type that can be decoded into a Swift RangeExpression type from a Postgres range where it is the bound type.
protocol PostgresRangeDecodable : PostgresDecodable
Topics
Instance Methods
func upperBoundExclusiveToUpperBoundInclusive() throws -> SelfIf a Postgres range type has a well-defined step, Postgres automatically converts it to a canonical form. Types such asint4rangeget converted to upper-bound-exclusive. This method is needed when converting an upper bound to inclusive. It should throw if the type lacks a well-defined step.
Type Properties
static var valueForEmptyRange: SelfPostgres does not store any bound values for empty ranges, but Swift requires a value to initialize an empty Range.
Relationships
Inherits From
Inherited By
Conforming Types
See Also
Decoding
protocol PostgresDecodableA type that can decode itself from a Postgres wire binary representation.protocol PostgresArrayDecodableA type that can be decoded into a Swift Array of its own type from a Postgres array.protocol PostgresRangeArrayDecodableA type that can be decoded into a Swift RangeExpression array type from a Postgres range array where it is the bound type.struct PostgresDecodingContextA context that is passed to Swift objects that are decoded from the Postgres wire format. Used to pass further information to the decoding method.