Class DseGraph
Utility class for interacting with DataStax Enterprise Graph and Apache TinkerPop.
Inheritance
Inherited Members
Namespace: Dse.Graph
Assembly: Dse.Graph.dll
Syntax
public static class DseGraph
Methods
ExecuteGraph(IDseSession, ITraversal)
Creates a Dse.Graph.IGraphStatement from the given traversal and executes it using the provided session.
Declaration
public static GraphResultSet ExecuteGraph(this IDseSession session, ITraversal traversal)
Parameters
Type | Name | Description |
---|---|---|
Dse.IDseSession | session | The session instance used to execute the statement. |
Gremlin.Net.Process.Traversal.ITraversal | traversal | The traversal to create the statement to execute. |
Returns
Type | Description |
---|---|
Dse.Graph.GraphResultSet |
ExecuteGraphAsync(IDseSession, ITraversal)
Creates a Dse.Graph.IGraphStatement from the given traversal and asynchronously executes it using the provided session.
Declaration
public static Task<GraphResultSet> ExecuteGraphAsync(this IDseSession session, ITraversal traversal)
Parameters
Type | Name | Description |
---|---|---|
Dse.IDseSession | session | The session instance used to execute the statement. |
Gremlin.Net.Process.Traversal.ITraversal | traversal | The traversal to create the statement to execute. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Dse.Graph.GraphResultSet> |
StatementFromTraversal(ITraversal)
Creates an initialized Dse.Graph.IGraphStatement from a GraphTraversal
to use directly with a
Dse.IDseSession.
Note that the IGraphStatement
will use the default GraphOptions
at cluster level and not the
ones defined on the GraphTraversalSource
.
Declaration
public static IGraphStatement StatementFromTraversal(ITraversal traversal)
Parameters
Type | Name | Description |
---|---|---|
Gremlin.Net.Process.Traversal.ITraversal | traversal |
Returns
Type | Description |
---|---|
Dse.Graph.IGraphStatement |
Traversal(IDseSession, GraphOptions)
Creates a new Apache TinkerPop's GraphTraversalSource
instance, that can be used to build
GraphTraversal
instances.
Declaration
public static GraphTraversalSource Traversal(IDseSession session, GraphOptions graphOptions = null)
Parameters
Type | Name | Description |
---|---|---|
Dse.IDseSession | session | The session instance, representing a pool of connections connected to the DSE cluster. |
Dse.Graph.GraphOptions | graphOptions | Configurations to use for this traversal source. When provided, the options on this instance will override
the ones defined when building the Dse.IDseCluster instance for These options won't have any effect when using the method StatementFromTraversal(ITraversal). |
Returns
Type | Description |
---|---|
Gremlin.Net.Process.Traversal.GraphTraversalSource |