Class GraphTraversalSource
A GraphTraversalSource is the primary DSL of the Gremlin traversal machine.
It provides access to all the configurations and steps for Turing complete graph computing.
Inheritance
System.Object
GraphTraversalSource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: cs.temp.dll.dll
Syntax
public class GraphTraversalSource
Constructors
GraphTraversalSource()
Declaration
public GraphTraversalSource()
GraphTraversalSource(ICollection<ITraversalStrategy>, Bytecode)
Declaration
public GraphTraversalSource(ICollection<ITraversalStrategy> traversalStrategies, Bytecode bytecode)
Parameters
| Type |
Name |
Description |
| ICollection<ITraversalStrategy> |
traversalStrategies |
The traversal strategies associated with this graph traversal source.
|
| Bytecode |
bytecode |
The Bytecode associated with the current state of this graph traversal
source.
|
GraphTraversalSource(ICollection<ITraversalStrategy>, Bytecode, IRemoteConnection)
Declaration
public GraphTraversalSource(ICollection<ITraversalStrategy> traversalStrategies, Bytecode bytecode, IRemoteConnection connection)
Parameters
Properties
Bytecode
Gets or sets the Bytecode associated with the current state of this graph traversal
source.
Declaration
public Bytecode Bytecode { get; set; }
Property Value
IsSessionBound
Declaration
public bool IsSessionBound { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
TraversalStrategies
Gets or sets the traversal strategies associated with this graph traversal source.
Declaration
public ICollection<ITraversalStrategy> TraversalStrategies { get; set; }
Property Value
Methods
AddE(ITraversal)
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the addE step to that
traversal.
Declaration
public GraphTraversal<Edge, Edge> AddE(ITraversal edgeLabelTraversal)
Parameters
| Type |
Name |
Description |
| ITraversal |
edgeLabelTraversal |
|
Returns
AddE(String)
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the addE step to that
traversal.
Declaration
public GraphTraversal<Edge, Edge> AddE(string label)
Parameters
| Type |
Name |
Description |
| System.String |
label |
|
Returns
AddV()
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the addV step to that
traversal.
Declaration
public GraphTraversal<Vertex, Vertex> AddV()
Returns
AddV(ITraversal)
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the addV step to that
traversal.
Declaration
public GraphTraversal<Vertex, Vertex> AddV(ITraversal vertexLabelTraversal)
Parameters
| Type |
Name |
Description |
| ITraversal |
vertexLabelTraversal |
|
Returns
AddV(String)
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the addV step to that
traversal.
Declaration
public GraphTraversal<Vertex, Vertex> AddV(string label)
Parameters
| Type |
Name |
Description |
| System.String |
label |
|
Returns
E(Object[])
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the E step to that
traversal.
Declaration
public GraphTraversal<Edge, Edge> E(params object[] edgesIds)
Parameters
| Type |
Name |
Description |
| System.Object[] |
edgesIds |
|
Returns
Inject<S>(S[])
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the inject step to that
traversal.
Declaration
public GraphTraversal<S, S> Inject<S>(params S[] starts)
Parameters
| Type |
Name |
Description |
| S[] |
starts |
|
Returns
Type Parameters
Io<S>(String)
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the io step to that
traversal.
Declaration
public GraphTraversal<S, S> Io<S>(string file)
Parameters
| Type |
Name |
Description |
| System.String |
file |
|
Returns
Type Parameters
Tx()
Spawns a new object that can then start and stop a transaction.
Declaration
public RemoteTransaction Tx()
Returns
| Type |
Description |
| RemoteTransaction |
The spawned transaction.
|
Exceptions
| Type |
Condition |
| System.InvalidOperationException |
Thrown if this traversal source is already bound to a session.
|
V(Object[])
Spawns a GraphTraversal<S, E> off this graph traversal source and adds the V step to that
traversal.
Declaration
public GraphTraversal<Vertex, Vertex> V(params object[] vertexIds)
Parameters
| Type |
Name |
Description |
| System.Object[] |
vertexIds |
|
Returns
With(String)
Declaration
public GraphTraversalSource With(string key)
Parameters
| Type |
Name |
Description |
| System.String |
key |
|
Returns
With(String, Object)
Declaration
public GraphTraversalSource With(string key, object value)
Parameters
| Type |
Name |
Description |
| System.String |
key |
|
| System.Object |
value |
|
Returns
WithBindings(Object)
Declaration
[Obsolete("Use the Bindings class instead.", false)]
public GraphTraversalSource WithBindings(object bindings)
Parameters
| Type |
Name |
Description |
| System.Object |
bindings |
|
Returns
WithBulk(Boolean)
Declaration
public GraphTraversalSource WithBulk(bool useBulk)
Parameters
| Type |
Name |
Description |
| System.Boolean |
useBulk |
|
Returns
WithComputer(String, Nullable<Int32>, String, String, ITraversal, ITraversal, Dictionary<String, Object>)
Add a GraphComputer class used to execute the traversal.
This adds a to the strategies.
Declaration
public GraphTraversalSource WithComputer(string graphComputer = null, int? workers = default(int? ), string persist = null, string result = null, ITraversal vertices = null, ITraversal edges = null, Dictionary<string, dynamic> configuration = null)
Parameters
| Type |
Name |
Description |
| System.String |
graphComputer |
|
| System.Nullable<System.Int32> |
workers |
|
| System.String |
persist |
|
| System.String |
result |
|
| ITraversal |
vertices |
|
| ITraversal |
edges |
|
| Dictionary<System.String, System.Object> |
configuration |
|
Returns
WithoutStrategies(Type[])
Declaration
public GraphTraversalSource WithoutStrategies(params Type[] traversalStrategyClasses)
Parameters
| Type |
Name |
Description |
| System.Type[] |
traversalStrategyClasses |
|
Returns
WithPath()
Declaration
public GraphTraversalSource WithPath()
Returns
WithRemote(IRemoteConnection)
Declaration
public GraphTraversalSource WithRemote(IRemoteConnection remoteConnection)
Parameters
| Type |
Name |
Description |
| IRemoteConnection |
remoteConnection |
The instance to use to submit the
GraphTraversal<S, E>.
|
Returns
WithSack(ISupplier)
Declaration
public GraphTraversalSource WithSack(ISupplier initialValue)
Parameters
Returns
WithSack(ISupplier, IBinaryOperator)
Declaration
public GraphTraversalSource WithSack(ISupplier initialValue, IBinaryOperator mergeOperator)
Parameters
Returns
WithSack(ISupplier, IUnaryOperator)
Declaration
public GraphTraversalSource WithSack(ISupplier initialValue, IUnaryOperator splitOperator)
Parameters
Returns
WithSack(ISupplier, IUnaryOperator, IBinaryOperator)
Declaration
public GraphTraversalSource WithSack(ISupplier initialValue, IUnaryOperator splitOperator, IBinaryOperator mergeOperator)
Parameters
Returns
WithSack(Object)
Declaration
public GraphTraversalSource WithSack(object initialValue)
Parameters
| Type |
Name |
Description |
| System.Object |
initialValue |
|
Returns
WithSack(Object, IBinaryOperator)
Declaration
public GraphTraversalSource WithSack(object initialValue, IBinaryOperator mergeOperator)
Parameters
| Type |
Name |
Description |
| System.Object |
initialValue |
|
| IBinaryOperator |
mergeOperator |
|
Returns
WithSack(Object, IUnaryOperator)
Declaration
public GraphTraversalSource WithSack(object initialValue, IUnaryOperator splitOperator)
Parameters
| Type |
Name |
Description |
| System.Object |
initialValue |
|
| IUnaryOperator |
splitOperator |
|
Returns
WithSack(Object, IUnaryOperator, IBinaryOperator)
Declaration
public GraphTraversalSource WithSack(object initialValue, IUnaryOperator splitOperator, IBinaryOperator mergeOperator)
Parameters
Returns
WithSideEffect(String, ISupplier)
Declaration
public GraphTraversalSource WithSideEffect(string key, ISupplier initialValue)
Parameters
| Type |
Name |
Description |
| System.String |
key |
|
| ISupplier |
initialValue |
|
Returns
WithSideEffect(String, ISupplier, IBinaryOperator)
Declaration
public GraphTraversalSource WithSideEffect(string key, ISupplier initialValue, IBinaryOperator reducer)
Parameters
Returns
WithSideEffect(String, Object)
Declaration
public GraphTraversalSource WithSideEffect(string key, object initialValue)
Parameters
| Type |
Name |
Description |
| System.String |
key |
|
| System.Object |
initialValue |
|
Returns
WithSideEffect(String, Object, IBinaryOperator)
Declaration
public GraphTraversalSource WithSideEffect(string key, object initialValue, IBinaryOperator reducer)
Parameters
| Type |
Name |
Description |
| System.String |
key |
|
| System.Object |
initialValue |
|
| IBinaryOperator |
reducer |
|
Returns
WithStrategies(ITraversalStrategy[])
Declaration
public GraphTraversalSource WithStrategies(params ITraversalStrategy[] traversalStrategies)
Parameters
Returns