View Source EdgeDB.Set (EdgeDB v0.1.0)
A representation of an immutable set of values returned by a query.
Nested sets in the result are also returned as EdgeDB.Set
objects.
EdgeDB.Set
implements Enumerable
protocol for iterating over set values.
iex(1)> {:ok, pid} = EdgeDB.start_link()
iex(2)> %EdgeDB.Set{} =
iex(2)> EdgeDB.query!(pid, "
...(2)> SELECT schema::ObjectType{
...(2)> name
...(2)> }
...(2)> FILTER .name IN {'std::BaseObject', 'std::Object', 'std::FreeObject'}
...(2)> ORDER BY .name
...(2)> ")
#EdgeDB.Set<{#EdgeDB.Object<name := "std::BaseObject">, #EdgeDB.Object<name := "std::FreeObject">, #EdgeDB.Object<name := "std::Object">}>
Link to this section Summary
Functions
Check if set is empty.
Link to this section Types
Specs
t()
A representation of an immutable set of values returned by a query.
Link to this section Functions
Specs
Check if set is empty.
iex(1)> {:ok, pid} = EdgeDB.start_link()
iex(2)> %EdgeDB.Set{} = set = EdgeDB.query!(pid, "SELECT Ticket")
iex(3)> EdgeDB.Set.empty?(set)
true