Semantic search

Jump to navigation Jump to search

map Step

The [http://tinkerpop.apache.org/docs/current/reference/#general-steps general-steps map] step transforms the current step element to a new element (which may be empty). see also https://stackoverflow.com/questions/51015636/in-gremlin-how-does-map-really-work

repeat Step

The [http://tinkerpop.apache.org/docs/current/reference/#repeat-step repeat-step repeat] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#repeat-org.apache.tinkerpop.gremlin.process.traversal.Traversal- (javadoc), repeat-org.apache.tinkerpop.gremlin.process.traversal.Traversal- (javadoc), [1] (javadoc)]is used for looping over a traversal given some break predicate

choose Step

The [http://tinkerpop.apache.org/docs/current/reference/#choose-step choose-step choose] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#choose-java.util.function.Function- (javadoc), choose-java.util.function.Function- (javadoc), [2] (javadoc)]routes the current traverser to a particular traversal branch option. With choose(), it is possible to implement if/then/else-semantics as well as more complicated selections.

tryNext Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps tryNext] step will return an Optional and thus, is a composite of hasNext()/next()

bothV Step

The bothV step maps the current edges to both the ingoing and outgoing Vertices.

inE Step

The inE step maps the current elements to the the ingoing edges.

out Step

The out step maps the current elements to the vertices at the end of the outgoing edges.

outV Step

The outV step The outV step maps the current edges to the outgoing Vertices.

by Step

The [http://tinkerpop.apache.org/docs/current/reference/#by-step by-step by] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#by-- by-- (javadoc)]is not an actual step, but instead is a "step-modulator" similar to as() and option(). If a step is able to accept traversals, functions, comparators, etc. then by() is the means by which they are added. The general pattern is step().by()…by(). Some steps can only accept one by() while others can take an arbitrary amount.

sum Step

The [http://tinkerpop.apache.org/docs/current/reference/#sum-step sum-step sum] step operates on a stream of numbers and sums the numbers together to yield a result

in Step

The in step maps the current elements to the vertices at the end of the ingoing edges.

or Step

The [http://tinkerpop.apache.org/docs/current/reference/#or-step or-step or] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#or-org.apache.tinkerpop.gremlin.process.traversal.Traversal...- or-org.apache.tinkerpop.gremlin.process.traversal.Traversal...- (javadoc)]ensures that at least one of the provided traversals yield a result.

emit Step

The [http://tinkerpop.apache.org/docs/current/reference/#emit-step emit-step emit] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#emit-- emit-- (javadoc)]is not an actual step, but is instead a step modulator for repeat() (find more documentation on the emit() there).

inV Step

The inV step maps the current edges to the the ingoing Vertices.

promise Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps promise] step can only be used with remote traversals to Gremlin Server or RGPs. It starts a promise to execute a function on the current Traversal that will be completed in the future.

where Step

The [http://tinkerpop.apache.org/docs/current/reference/#where-step where-step where] step filters the current object based on either the object itself (Scope.local) or the path history of the object (Scope.global) (filter). This step is typically used in conjunction with either #match Step or select()-step, but can be used in isolation.

tail Step

The [http://tinkerpop.apache.org/docs/current/reference/#tail-step tail-step tail] step

path Step

The [http://tinkerpop.apache.org/docs/current/reference/#path-step path-step path] step

addV Step

The [http://tinkerpop.apache.org/docs/current/reference/#addvertex-step addvertex-step addV] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#addV-java.lang.String- addV-java.lang.String- (javadoc)]is used to add vertices to the graph

branch Step

The [http://tinkerpop.apache.org/docs/current/reference/#general-steps general-steps branch] step Splits the traverser

label Step

The [http://tinkerpop.apache.org/docs/current/reference/#label-step label-step label] step maps the traversal to the labels of the current elements.

property Step

The [http://tinkerpop.apache.org/docs/current/reference/#addproperty-step addproperty-step property] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#property-java.lang.Object-java.lang.Object-java.lang.Object...- property-java.lang.Object-java.lang.Object-java.lang.Object...- (javadoc)]is used to add properties to the elements of the graph

toList Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps toList] step will return all results in a list

as Step

The [http://tinkerpop.apache.org/docs/current/reference/#as-step as-step as] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#as-java.lang.String-java.lang.String...- as-java.lang.String-java.lang.String...- (javadoc)]is not a real step, but a "step modulator" similar to by() and option(). With as(), it is possible to provide a label to the step that can later be accessed by steps and data structures that make use of such labels — e.g., select(), match(), and path

is Step

The [http://tinkerpop.apache.org/docs/current/reference/#is-step is-step is] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#is-org.apache.tinkerpop.gremlin.process.traversal.P- is-org.apache.tinkerpop.gremlin.process.traversal.P- (javadoc)]filters elements that fullfill the given predicate. Variant: Filters elements that are equal to the given Object.

both Step

The both step maps the current elements to the vertices at the boths ends of the edges.

count Step

The [http://tinkerpop.apache.org/docs/current/reference/#count-step count-step count] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#count-- count-- (javadoc)]counts the total number of represented traversers in the streams (i.e. the bulk count).

union Step

The [http://tinkerpop.apache.org/docs/current/reference/#repeat-step repeat-step union] step

cap Step

The [http://tinkerpop.apache.org/docs/current/reference/#cap-step cap-step cap] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#cap-java.lang.String-java.lang.String...- cap-java.lang.String-java.lang.String...- (javadoc)]Iterates the traversal up to the itself and emits the side-effect referenced by the key. If multiple keys are supplied then the side-effects are emitted as a Map.

addE Step

The [http://tinkerpop.apache.org/docs/current/reference/#addedge-step addedge-step addE] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#addE-java.lang.String- addE-java.lang.String- (javadoc)]is used to add edges to the graph

filter Step

The [http://tinkerpop.apache.org/docs/current/reference/#general-steps general-steps filter] step Continues processing based on the given filter condition.

max Step

The [http://tinkerpop.apache.org/docs/current/reference/#max-step max-step max] step operates on a stream of comparable objects and determines which is the last object according to its natural order in the stream.

coalesce Step

The [http://tinkerpop.apache.org/docs/current/reference/#coalesce-step coalesce-step coalesce] step The coalesce()-step evaluates the provided traversals in order and returns the first traversal that emits at least one element.

toSet Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps toSet] step will return all results in a set and thus, duplicates removed

option Step

The [http://tinkerpop.apache.org/docs/current/reference/#option-step option-step option] step An option to a branch() or choose()

and Step

The [http://tinkerpop.apache.org/docs/current/reference/#and-step and-step and] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#and-org.apache.tinkerpop.gremlin.process.traversal.Traversal...- and-org.apache.tinkerpop.gremlin.process.traversal.Traversal...- (javadoc)]ensures that all provided traversals yield a result

outE Step

The outE step maps the current elements to the the outgoing edges.

bothE Step

The bothE step maps the current elements to both the in and outgoing edges.

iterate Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps iterate] step Iterates the traversal presumably for the generation of side-effects. See https://stackoverflow.com/questions/47403296/iterate-step-is-used-in-the-end-of-the-command-when-creating-nodes-and-edges-t

fold Step

The [http://tinkerpop.apache.org/docs/current/reference/#fold-step fold-step fold] step There are situations when the traversal stream needs a "barrier" to aggregate all the objects and emit a computation that is a function of the aggregate. The fold()-step (map) is one particular instance of this. Please see unfold()-step for the inverse functionality.

explain Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps explain] step will return a TraversalExplanation. A traversal explanation details how the traversal (prior to explain()) will be compiled given the registered traversal strategies. A TraversalExplanation has a toString() representation with 3-columns. The first column is the traversal strategy being applied. The second column is the traversal strategy category: [D]ecoration, [O]ptimization, [P]rovider optimization, [F]inalization, and [V]erification. Finally, the third column is the state of the traversal post strategy application. The final traversal is the resultant execution plan.

order Step

The [http://tinkerpop.apache.org/docs/current/reference/#order-step order-step order] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#order-- (javadoc), order-- (javadoc), [3] (javadoc)]orders the traversal elements

select Step

The [http://tinkerpop.apache.org/docs/current/reference/#select-step select-step select] step

limit Step

The [http://tinkerpop.apache.org/docs/current/reference/#limit-step limit-step limit] step

fill Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps fill] step fill(collection) will put all results in the provided collection and return the collection when complete.

mean Step

The [http://tinkerpop.apache.org/docs/current/reference/#mean-step mean-step mean] step operates on a stream of numbers and determines the average of those numbers.

sideEffect Step

The [http://tinkerpop.apache.org/docs/current/reference/#general-steps general-steps sideEffect] step performs some operation on the traverser and passes it to the next step.

toBulkSet Step

The [http://tinkerpop.apache.org/docs/current/reference/#terminal-steps terminal-steps toBulkSet] step will return all results in a weighted set and thus, duplicates preserved via weighting

coin Step

The [http://tinkerpop.apache.org/docs/current/reference/#coin-step coin-step coin] step [http://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#coin-double- coin-double- (javadoc)]randomly filters out traversers with the given probability

min Step

The [http://tinkerpop.apache.org/docs/current/reference/#min-step min-step min] step operates on a stream of comparable objects and determines which is the first object according to its natural order in the stream.