Search Results for

    Show / Hide Table of Contents

    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
    object
    GraphTraversalSource
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Gremlin.Net.Process.Traversal
    Assembly: Gremlin.Net.dll
    Syntax
    public class GraphTraversalSource

    Constructors

    GraphTraversalSource()

    Initializes a new instance of the GraphTraversalSource class.

    Declaration
    public GraphTraversalSource()

    GraphTraversalSource(ICollection<ITraversalStrategy>, Bytecode)

    Initializes a new instance of the GraphTraversalSource class.

    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
    Type Name Description
    ICollection<ITraversalStrategy> traversalStrategies
    Bytecode bytecode
    IRemoteConnection connection

    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
    Type Description
    Bytecode

    IsSessionBound

    Declaration
    public bool IsSessionBound { get; }
    Property Value
    Type Description
    bool

    TraversalStrategies

    Gets or sets the traversal strategies associated with this graph traversal source.

    Declaration
    public ICollection<ITraversalStrategy> TraversalStrategies { get; set; }
    Property Value
    Type Description
    ICollection<ITraversalStrategy>

    Methods

    AddE(ITraversal)

    Spawns a GraphTraversal<TStart, TEnd> 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
    Type Description
    GraphTraversal<Edge, Edge>

    AddE(string)

    Spawns a GraphTraversal<TStart, TEnd> 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
    string label
    Returns
    Type Description
    GraphTraversal<Edge, Edge>

    AddV()

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the addV step to that traversal.

    Declaration
    public GraphTraversal<Vertex, Vertex> AddV()
    Returns
    Type Description
    GraphTraversal<Vertex, Vertex>

    AddV(ITraversal)

    Spawns a GraphTraversal<TStart, TEnd> 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
    Type Description
    GraphTraversal<Vertex, Vertex>

    AddV(string)

    Spawns a GraphTraversal<TStart, TEnd> 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
    string label
    Returns
    Type Description
    GraphTraversal<Vertex, Vertex>

    Call<TStart>()

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the call step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Call<TStart>()
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    Call<TStart>(string?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the call step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Call<TStart>(string? service)
    Parameters
    Type Name Description
    string service
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    Call<TStart>(string?, ITraversal?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the call step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Call<TStart>(string? service, ITraversal? t)
    Parameters
    Type Name Description
    string service
    ITraversal t
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    Call<TStart>(string?, IDictionary<object, object>?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the call step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Call<TStart>(string? service, IDictionary<object, object>? m)
    Parameters
    Type Name Description
    string service
    IDictionary<object, object> m
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    Call<TStart>(string?, IDictionary<object, object>?, ITraversal?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the call step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Call<TStart>(string? service, IDictionary<object, object>? m, ITraversal? t)
    Parameters
    Type Name Description
    string service
    IDictionary<object, object> m
    ITraversal t
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    E(params object?[]?)

    Spawns a GraphTraversal<TStart, TEnd> 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
    object[] edgesIds
    Returns
    Type Description
    GraphTraversal<Edge, Edge>

    Inject<TStart>(params TStart?[]?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the inject step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Inject<TStart>(params TStart?[]? starts)
    Parameters
    Type Name Description
    TStart[] starts
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    Io<TStart>(string)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the io step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Io<TStart>(string file)
    Parameters
    Type Name Description
    string file
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    MergeE(ITraversal?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the mergeE step to that traversal.

    Declaration
    public GraphTraversal<Edge, Edge> MergeE(ITraversal? t)
    Parameters
    Type Name Description
    ITraversal t
    Returns
    Type Description
    GraphTraversal<Edge, Edge>

    MergeE(IDictionary<object, object>?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the mergeE step to that traversal.

    Declaration
    public GraphTraversal<Edge, Edge> MergeE(IDictionary<object, object>? m)
    Parameters
    Type Name Description
    IDictionary<object, object> m
    Returns
    Type Description
    GraphTraversal<Edge, Edge>

    MergeV(ITraversal?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the mergeV step to that traversal.

    Declaration
    public GraphTraversal<Vertex, Vertex> MergeV(ITraversal? t)
    Parameters
    Type Name Description
    ITraversal t
    Returns
    Type Description
    GraphTraversal<Vertex, Vertex>

    MergeV(IDictionary<object, object>?)

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the mergeV step to that traversal.

    Declaration
    public GraphTraversal<Vertex, Vertex> MergeV(IDictionary<object, object>? m)
    Parameters
    Type Name Description
    IDictionary<object, object> m
    Returns
    Type Description
    GraphTraversal<Vertex, Vertex>

    Tx()

    Spawns a new RemoteTransaction object that can then start and stop a transaction.

    Declaration
    public RemoteTransaction Tx()
    Returns
    Type Description
    RemoteTransaction

    The spawned transaction.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this traversal source is already bound to a session.

    Union<TStart>(params ITraversal[])

    Spawns a GraphTraversal<TStart, TEnd> off this graph traversal source and adds the union step to that traversal.

    Declaration
    public GraphTraversal<TStart, TStart> Union<TStart>(params ITraversal[] unionTraversals)
    Parameters
    Type Name Description
    ITraversal[] unionTraversals
    Returns
    Type Description
    GraphTraversal<TStart, TStart>
    Type Parameters
    Name Description
    TStart

    V(params object?[]?)

    Spawns a GraphTraversal<TStart, TEnd> 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
    object[] vertexIds
    Returns
    Type Description
    GraphTraversal<Vertex, Vertex>

    With(string)

    Declaration
    public GraphTraversalSource With(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    GraphTraversalSource

    With(string, object?)

    Declaration
    public GraphTraversalSource With(string key, object? value)
    Parameters
    Type Name Description
    string key
    object value
    Returns
    Type Description
    GraphTraversalSource

    WithBindings(object?)

    Declaration
    [Obsolete("Use the Bindings class instead.", false)]
    public GraphTraversalSource WithBindings(object? bindings)
    Parameters
    Type Name Description
    object bindings
    Returns
    Type Description
    GraphTraversalSource

    WithBulk(bool)

    Declaration
    public GraphTraversalSource WithBulk(bool useBulk)
    Parameters
    Type Name Description
    bool useBulk
    Returns
    Type Description
    GraphTraversalSource

    WithComputer(string?, int?, string?, string?, ITraversal?, ITraversal?, Dictionary<string, dynamic>?)

    Add a GraphComputer class used to execute the traversal. This adds a VertexProgramStrategy to the strategies.

    Declaration
    public GraphTraversalSource WithComputer(string? graphComputer = null, int? workers = null, string? persist = null, string? result = null, ITraversal? vertices = null, ITraversal? edges = null, Dictionary<string, dynamic>? configuration = null)
    Parameters
    Type Name Description
    string graphComputer
    int? workers
    string persist
    string result
    ITraversal vertices
    ITraversal edges
    Dictionary<string, object> configuration
    Returns
    Type Description
    GraphTraversalSource

    WithPath()

    Declaration
    public GraphTraversalSource WithPath()
    Returns
    Type Description
    GraphTraversalSource

    WithRemote(IRemoteConnection)

    Configures the GraphTraversalSource as a "remote" to issue the GraphTraversal<TStart, TEnd> for execution elsewhere.

    Declaration
    public GraphTraversalSource WithRemote(IRemoteConnection remoteConnection)
    Parameters
    Type Name Description
    IRemoteConnection remoteConnection

    The IRemoteConnection instance to use to submit the GraphTraversal<TStart, TEnd>.

    Returns
    Type Description
    GraphTraversalSource

    A GraphTraversalSource configured to use the provided IRemoteConnection.

    WithSack(ISupplier?)

    Declaration
    public GraphTraversalSource WithSack(ISupplier? initialValue)
    Parameters
    Type Name Description
    ISupplier initialValue
    Returns
    Type Description
    GraphTraversalSource

    WithSack(ISupplier?, IBinaryOperator?)

    Declaration
    public GraphTraversalSource WithSack(ISupplier? initialValue, IBinaryOperator? mergeOperator)
    Parameters
    Type Name Description
    ISupplier initialValue
    IBinaryOperator mergeOperator
    Returns
    Type Description
    GraphTraversalSource

    WithSack(ISupplier?, IUnaryOperator?)

    Declaration
    public GraphTraversalSource WithSack(ISupplier? initialValue, IUnaryOperator? splitOperator)
    Parameters
    Type Name Description
    ISupplier initialValue
    IUnaryOperator splitOperator
    Returns
    Type Description
    GraphTraversalSource

    WithSack(ISupplier?, IUnaryOperator?, IBinaryOperator?)

    Declaration
    public GraphTraversalSource WithSack(ISupplier? initialValue, IUnaryOperator? splitOperator, IBinaryOperator? mergeOperator)
    Parameters
    Type Name Description
    ISupplier initialValue
    IUnaryOperator splitOperator
    IBinaryOperator mergeOperator
    Returns
    Type Description
    GraphTraversalSource

    WithSack(object?)

    Declaration
    public GraphTraversalSource WithSack(object? initialValue)
    Parameters
    Type Name Description
    object initialValue
    Returns
    Type Description
    GraphTraversalSource

    WithSack(object?, IBinaryOperator?)

    Declaration
    public GraphTraversalSource WithSack(object? initialValue, IBinaryOperator? mergeOperator)
    Parameters
    Type Name Description
    object initialValue
    IBinaryOperator mergeOperator
    Returns
    Type Description
    GraphTraversalSource

    WithSack(object?, IUnaryOperator?)

    Declaration
    public GraphTraversalSource WithSack(object? initialValue, IUnaryOperator? splitOperator)
    Parameters
    Type Name Description
    object initialValue
    IUnaryOperator splitOperator
    Returns
    Type Description
    GraphTraversalSource

    WithSack(object?, IUnaryOperator?, IBinaryOperator?)

    Declaration
    public GraphTraversalSource WithSack(object? initialValue, IUnaryOperator? splitOperator, IBinaryOperator? mergeOperator)
    Parameters
    Type Name Description
    object initialValue
    IUnaryOperator splitOperator
    IBinaryOperator mergeOperator
    Returns
    Type Description
    GraphTraversalSource

    WithSideEffect(string?, ISupplier?)

    Declaration
    public GraphTraversalSource WithSideEffect(string? key, ISupplier? initialValue)
    Parameters
    Type Name Description
    string key
    ISupplier initialValue
    Returns
    Type Description
    GraphTraversalSource

    WithSideEffect(string?, ISupplier?, IBinaryOperator?)

    Declaration
    public GraphTraversalSource WithSideEffect(string? key, ISupplier? initialValue, IBinaryOperator? reducer)
    Parameters
    Type Name Description
    string key
    ISupplier initialValue
    IBinaryOperator reducer
    Returns
    Type Description
    GraphTraversalSource

    WithSideEffect(string?, object?)

    Declaration
    public GraphTraversalSource WithSideEffect(string? key, object? initialValue)
    Parameters
    Type Name Description
    string key
    object initialValue
    Returns
    Type Description
    GraphTraversalSource

    WithSideEffect(string?, object?, IBinaryOperator)

    Declaration
    public GraphTraversalSource WithSideEffect(string? key, object? initialValue, IBinaryOperator reducer)
    Parameters
    Type Name Description
    string key
    object initialValue
    IBinaryOperator reducer
    Returns
    Type Description
    GraphTraversalSource

    WithStrategies(params ITraversalStrategy[])

    Declaration
    public GraphTraversalSource WithStrategies(params ITraversalStrategy[] traversalStrategies)
    Parameters
    Type Name Description
    ITraversalStrategy[] traversalStrategies
    Returns
    Type Description
    GraphTraversalSource

    WithoutStrategies(params Type?[])

    Declaration
    public GraphTraversalSource WithoutStrategies(params Type?[] traversalStrategyClasses)
    Parameters
    Type Name Description
    Type[] traversalStrategyClasses
    Returns
    Type Description
    GraphTraversalSource
    In this article
    Back to top Copyright © 2018 The Apache Software Foundation