gremlex v0.3.2 Gremlex.Graph View Source
Functions for traversing and mutating the Graph.
Graph operations are stored in a queue which can be created with g/0
.
Mosts functions return the queue so that they can be chained together
similar to how Gremlin queries work.
Example:
g.V(1).values("name")
Would translate to
g |> v(1) |> values("name")
Note: This module doesn’t actually execute any queries, it just allows you to build one.
For query execution see Gremlex.Client.query/1
Link to this section Summary
Functions
Appends an addE command to the traversal. Returns a graph to allow chaining
Adds a namespace as property
Appends an addV command to the traversal. Returns a graph to allow chaining
Appends an aggregate command to the traversal. Returns a graph to allow chaining
Appends a coin command to the traversal. Takes in a graph and a probability modifier as parameters. Returns a graph to allow chaining
Appends values the E
command allowing you to select an edge.
Returns a graph to allow chaining
Compiles a graph into the Gremlin query
Start of graph traversal. All graph operations are stored in a queue
Appends groupCount command to the traversal. Takes in a graph and the name of the key that will hold the aggregated grouping. Returns a graph to allow chainig
Appends properties command to the traversal. Returns a graph to allow chaining
Appends property command to the traversal. Returns a graph to allow chaining
Appends the store command to the traversal. Takes in a graph and the name of the side effect key that will hold the aggregate. Returns a graph to allow chaining
Appends values the V
command allowing you to select a vertex.
Returns a graph to allow chaining
Appends values the V
command allowing you to select a vertex.
Returns a graph to allow chaining
Appends valueMap command to the traversal. Returns a graph to allow chaining
Appends values command to the traversal. Returns a graph to allow chaining
Creates a within
predicate that will match at least one of the values provided.
Takes in a range or a list as the values.
Examples:
g.V().has('age', within(1..18))
g.V().has('name', within(["some", "value"]))
Creates a without
predicate that will filter out values that match the values provided.
Takes in a range or a list as the values.
Examples:
g.V().has('age', without(18..30))
g.V().has('name', without(["any", "value"]))
Link to this section Types
Link to this section Functions
add_e(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
Appends an addE command to the traversal. Returns a graph to allow chaining.
add_namespace(Gremlex.Graph.t()) :: Gremlex.Graph.t()
Adds a namespace as property
add_namespace(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
add_v(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
Appends an addV command to the traversal. Returns a graph to allow chaining.
aggregate(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
Appends an aggregate command to the traversal. Returns a graph to allow chaining.
as(Gremlex.Graph.t(), List.t() | String.t()) :: Gremlex.Graph.t()
barrier(Gremlex.Graph.t(), non_neg_integer()) :: Gremlex.Graph.t()
both(Gremlex.Graph.t(), List.t()) :: Gremlex.Graph.t()
both(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
both_e(Gremlex.Graph.t(), String.t() | List.t()) :: Gremlex.Graph.t()
both_v(Gremlex.Graph.t(), List.t() | String.t()) :: Gremlex.Graph.t()
by(Gremlex.Graph.t(), List.t() | String.t()) :: Gremlex.Graph.t()
cap(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
coalesce(Gremlex.Graph.t(), List.t() | String.t()) :: Gremlex.Graph.t()
coin(Gremlex.Graph.t(), Float.t()) :: Gremlex.Graph.t()
Appends a coin command to the traversal. Takes in a graph and a probability modifier as parameters. Returns a graph to allow chaining.
constant(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
cyclic_path(Gremlex.Graph.t()) :: Gremlex.Graph.t()
Appends values the E
command allowing you to select an edge.
Returns a graph to allow chaining.
e(Gremlex.Graph.t(), Gremlex.Edge.t()) :: Gremlex.Graph.t()
e(Gremlex.Graph.t(), number() | String.t()) :: Gremlex.Graph.t()
Compiles a graph into the Gremlin query.
eq(Gremlex.Graph.t(), number()) :: Gremlex.Graph.t()
fold(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
from(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
Start of graph traversal. All graph operations are stored in a queue.
group_count(Gremlex.Graph.t()) :: Gremlex.Graph.t()
group_count(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
Appends groupCount command to the traversal. Takes in a graph and the name of the key that will hold the aggregated grouping. Returns a graph to allow chainig.
has(Gremlex.Graph.t(), any(), any()) :: Gremlex.Graph.t()
has_id(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
has_key(Gremlex.Graph.t(), List.t() | String.t()) :: Gremlex.Graph.t()
has_label(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
has_namespace(Gremlex.Graph.t()) :: Gremlex.Graph.t()
has_namespace(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
has_not(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
in_(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
in_(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
in_e(Gremlex.Graph.t(), String.t() | List.t()) :: Gremlex.Graph.t()
in_v(Gremlex.Graph.t(), String.t() | List.t()) :: Gremlex.Graph.t()
inject(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
is(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
next(Gremlex.Graph.t(), number()) :: Gremlex.Graph.t()
not_(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
out(Gremlex.Graph.t(), String.t() | List.t()) :: Gremlex.Graph.t()
out_e(Gremlex.Graph.t(), String.t() | List.t()) :: Gremlex.Graph.t()
out_v(Gremlex.Graph.t(), String.t() | List.t()) :: Gremlex.Graph.t()
properties(Gremlex.Graph.t()) :: Gremlex.Graph.t()
properties(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
Appends properties command to the traversal. Returns a graph to allow chaining.
property(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
property(Gremlex.Graph.t(), String.t(), any()) :: Gremlex.Graph.t()
Appends property command to the traversal. Returns a graph to allow chaining.
property(Gremlex.Graph.t(), atom(), String.t(), any()) :: Gremlex.Graph.t()
property(Gremlex.Graph.t(), atom(), String.t(), any()) :: Gremlex.Graph.t()
property(Gremlex.Graph.t(), atom(), String.t(), any()) :: Gremlex.Graph.t()
repeat(Gremlex.Graph.t(), Gremlex.Graph.t()) :: Gremlex.Graph.t()
select(Gremlex.Graph.t(), List.t() | String.t()) :: Gremlex.Graph.t()
simple_path(Gremlex.Graph.t()) :: Gremlex.Graph.t()
store(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
Appends the store command to the traversal. Takes in a graph and the name of the side effect key that will hold the aggregate. Returns a graph to allow chaining.
tail(Gremlex.Graph.t(), non_neg_integer()) :: Gremlex.Graph.t()
to(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
to_bulk_set(Gremlex.Graph.t()) :: Gremlex.Graph.t()
unfold(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
until(Gremlex.Graph.t(), Gremlex.Graph.t()) :: Gremlex.Graph.t()
v(Gremlex.Graph.t()) :: Gremlex.Graph.t()
v(number()) :: Gremlex.Vertex.t()
Appends values the V
command allowing you to select a vertex.
Returns a graph to allow chaining.
v(Gremlex.Graph.t(), Gremlex.Vertex.t()) :: Gremlex.Graph.t()
v(Gremlex.Graph.t(), number()) :: Gremlex.Graph.t()
v(Gremlex.Graph.t(), List.t() | String.t()) :: Gremlex.Graph.t()
Appends values the V
command allowing you to select a vertex.
Returns a graph to allow chaining.
value_map(Gremlex.Graph.t()) :: Gremlex.Graph.t()
Appends valueMap command to the traversal. Returns a graph to allow chaining.
value_map(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
value_map(Gremlex.Graph.t(), [String.t()]) :: Gremlex.Graph.t()
values(Gremlex.Graph.t(), String.t()) :: Gremlex.Graph.t()
Appends values command to the traversal. Returns a graph to allow chaining.
where(Gremlex.Graph.t(), any()) :: Gremlex.Graph.t()
Creates a within
predicate that will match at least one of the values provided.
Takes in a range or a list as the values.
Examples:
g.V().has('age', within(1..18))
g.V().has('name', within(["some", "value"]))
Creates a without
predicate that will filter out values that match the values provided.
Takes in a range or a list as the values.
Examples:
g.V().has('age', without(18..30))
g.V().has('name', without(["any", "value"]))