View Source Postgrex.Range (Postgrex v0.17.5)

Struct for PostgreSQL range.

Note that PostgreSQL itself does not return ranges exactly as stored: SELECT '(1,5)'::int4range returns [2,5), which is equivalent in terms of the values included in the range (PostgreSQL docs). When selecting data, this struct simply reflects what PostgreSQL returns.

Fields

  • lower
  • upper
  • lower_inclusive
  • upper_inclusive

Summary

Types

@type t() :: %Postgrex.Range{
  lower: term() | :empty | :unbound,
  lower_inclusive: boolean(),
  upper: term() | :empty | :unbound,
  upper_inclusive: boolean()
}