Execute the query and adds the results, with all tags, as a string-to-string (tag to node) map in the output set, one for each path that a traversal could take.
Alias for tag.
Return current path to a set of nodes on a given tag, preserving all constraints. If still valid, a path will now consider their vertex to be the same one as the previously tagged one, with the added constraint that it was valid all the way here. Useful for traversing back in queries and taking another route for things that have matched so far.
Return a number of results and returns it as a value.
The same as follow but follows the chain in the reverse direction. Flips "In" and "Out" where appropriate, the net result being a virtual predicate followed in the reverse direction. Starts at the end of the morphism and follows it backwards (with appropriate flipped directions) to the g.M() location.
The same as All, but limited to the first N unique nodes at the end of the path, and each of their possible traversals.
Filter all paths which are, at this point, on the subject for the given predicate and object, but do not follow the path, merely filter the possible paths. Usually useful for starting with all nodes, or limiting to a subset depending on some predicate/value pair. /
The same as Has, but sets constraint in reverse direction.
The inverse of out. Starting with the nodes in path
on the object, follow the quads with predicates defined by predicatePath
to their subjects.
Get the list of predicates that are pointing in to a node.
Filter all paths to ones which, at this point, are on the given node.
Set (or remove) the subgraph context to consider in the following traversals. Affects all in(), out(), and both() calls that follow it. The default LabelContext is null (all subgraphs).
Get the list of inbound and outbound quad labels
Limit a number of nodes for current path.
Order returns values from the path in ascending order.
The work-a-day way to get between nodes, in the forward direction. Starting with the nodes in path
on the subject, follow the quads with predicates defined by predicatePath
to their objects.
Get the list of predicates that are pointing out from a node.
Save the object of all quads with predicate into tag, without traversal.
Tag the list of predicates that are pointing in to a node.
The same as save, but returns empty tags if predicate does not exists.
The same as saveOpt, but tags values via reverse predicate.
Tag the list of predicates that are pointing out from a node.
The same as save, but tags values via reverse predicate.
Skip a number of nodes for current path.
Save a list of nodes to a given tag. In order to save your work or learn more about how a path got to the end, we have tags. The simplest thing to do is to add a tag anywhere you'd like to put each node in the result set. /reached "Tag"
The same as toArray, but instead of a list of top-level nodes, returns an Array of tag-to-string dictionaries, much as All would, except inside the JS environment.
The same as TagArray, but limited to one result node. Returns a tag-to-string map.
Execute a query and returns the results at the end of the query path as an JS array.
The same as ToArray, but limited to one result node.
Remove duplicate values from the path.
Generated using TypeDoc
Both
.Morphism()
and.Vertex()
create path objects, which provide the following traversal methods. Note that.Vertex()
returns a query object, which is a subclass of path object.For these examples, suppose we have the following graph:
+-------+ +------+ | alice |----- ->| fred |<-- +-------+ \---->+-------+-/ +------+ \-+-------+ ----->| #bob# | | |*emily*| +---------+--/ --->+-------+ | +-------+ | charlie | / v +---------+ / +--------+ \--- +--------+ |*#greg#*| \-->| #dani# |------------>+--------+ +--------+
Where every link is a
<follows>
relationship, and the nodes with an extra#
in the name have an extra<status>
link. As in,<dani> -- <status> --> "cool_person"
Perhaps these are the influencers in our community. So too are extra
*
s in the name -- these are our smart people, according to the<smart_graph>
label, eg, the quad:<greg> <status> "smart_person" <smart_graph> .