View Source EdgeDB.Range (EdgeDB v0.7.0)
A value representing some interval of values.
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> EdgeDB.query_required_single!(client, "select range(1, 10)")
#EdgeDB.Range<[1, 10)>
Summary
Types
Options for EdgeDB.Range.new/3
function.
A value of EdgeDB.Range.value/0
type representing some interval of values.
A value of EdgeDB.Range.value/0
type representing some interval of values.
A type that is acceptable by EdgeDB ranges.
Types
Options for EdgeDB.Range.new/3
function.
Supported options:
:inc_lower
- flag whether the created range should strictly include the lower boundary.:inc_upper
- flag whether the created range should strictly include the upper boundary.:empty
- flag to create an empty range.
A value of EdgeDB.Range.value/0
type representing some interval of values.
@type t(value) :: %EdgeDB.Range{ inc_lower: boolean(), inc_upper: boolean(), is_empty: boolean(), lower: value | nil, upper: value | nil }
A value of EdgeDB.Range.value/0
type representing some interval of values.
Fields:
:lower
- data for the lower range boundary.:upper
- data for the upper range boundary.:inc_lower
- flag whether the range should strictly include the lower boundary.:inc_upper
- flag whether the range should strictly include the upper boundary.:is_empty
- flag for an empty range.
@type value() :: integer() | float() | Decimal.t() | DateTime.t() | NaiveDateTime.t() | Date.t()
A type that is acceptable by EdgeDB ranges.
Functions
@spec empty() :: t()
Create an empty range.
iex(1)> EdgeDB.Range.empty()
#EdgeDB.Range<empty>
@spec new(value | nil, value | nil, [creation_option()]) :: t(value) when value: value()
Create new range.
iex(1)> EdgeDB.Range.new(1.1, 3.3, inc_upper: true)
#EdgeDB.Range<[1.1, 3.3]>