Skip to content

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

  • upperBoundExclusiveToUpperBoundInclusive()
    If a Postgres range type has a well-defined step, Postgres automatically converts it to a canonical form. Types such as int4range get 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

  • valueForEmptyRange
    Postgres 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

  • PostgresDecodable
    A type that can decode itself from a Postgres wire binary representation.
  • PostgresArrayDecodable
    A type that can be decoded into a Swift Array of its own type from a Postgres array.
  • PostgresRangeArrayDecodable
    A type that can be decoded into a Swift RangeExpression array type from a Postgres range array where it is the bound type.
  • PostgresDecodingContext
    A context that is passed to Swift objects that are decoded from the Postgres wire format. Used to pass further information to the decoding method.