Gel.MultiRange (Gel v0.9.0)

View Source

A value representing a collection of ranges.

Gel.MultiRange implements Enumerable protocol for iterating over the collection. Each range in the collection is an instance of the Gel.Range.t/0 struct.

iex(1)> {:ok, client} = Gel.start_link()
iex(2)> Gel.query_required_single!(client, "select multirange([range(1, 10)])")
#Gel.MultiRange<[#Gel.Range<[1, 10)>]>

Summary

Types

t()

A value of Gel.MultiRange.value/0 type representing a collection of intervals of values.

A value of Gel.MultiRange.value/0 type representing a collection of intervals of values.

A type that is acceptable by Gel ranges.

Functions

Create a new multirange.

Create a new multirange from enumerable.

Types

t()

(since 0.7.0)
@type t() :: t(value())

A value of Gel.MultiRange.value/0 type representing a collection of intervals of values.

t(value)

(since 0.7.0)
@opaque t(value)

A value of Gel.MultiRange.value/0 type representing a collection of intervals of values.

value()

(since 0.7.0)
@type value() :: Gel.Range.value()

A type that is acceptable by Gel ranges.

Functions

new()

(since 0.7.0)
@spec new() :: t()

Create a new multirange.

new(enumerable)

(since 0.7.0)
@spec new(Enumerable.t(Gel.Range.t(v))) :: t(v) when v: value()

Create a new multirange from enumerable.