Interface IDseSession
Represents an ISession suitable for querying a DataStax Enterprise (DSE) Cluster.
Session instances are designed to be long-lived, thread-safe and usually a single instance is enough per application.
Inherited Members
Namespace: Dse
Assembly: Dse.dll
Syntax
public interface IDseSession : ISession, IDisposable
Methods
ExecuteGraph(IGraphStatement)
Executes a graph statement.
Declaration
GraphResultSet ExecuteGraph(IGraphStatement statement)
Parameters
Type | Name | Description |
---|---|---|
IGraphStatement | statement | The graph statement containing the query |
Returns
Type | Description |
---|---|
GraphResultSet |
Examples
GraphResultSet rs = session.ExecuteGraph(new SimpleGraphStatement("g.V()"));
ExecuteGraph(IGraphStatement, String)
Executes a graph statement with the provided execution profile. The execution profile must have been added previously to the DseCluster using WithExecutionProfiles(Action<IExecutionProfileOptions>).
Declaration
GraphResultSet ExecuteGraph(IGraphStatement statement, string executionProfileName)
Parameters
Type | Name | Description |
---|---|---|
IGraphStatement | statement | The graph statement containing the query |
System.String | executionProfileName | The graph execution profile name to use while executing this statement. |
Returns
Type | Description |
---|---|
GraphResultSet |
Examples
GraphResultSet rs = session.ExecuteGraph(new SimpleGraphStatement("g.V()"), "graphProfile");
ExecuteGraphAsync(IGraphStatement)
Executes a graph statement.
Declaration
Task<GraphResultSet> ExecuteGraphAsync(IGraphStatement statement)
Parameters
Type | Name | Description |
---|---|---|
IGraphStatement | statement | The graph statement containing the query |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GraphResultSet> |
Examples
Task<GraphResultSet$gt; task = session.ExecuteGraphAsync(new SimpleGraphStatement("g.V()"));
ExecuteGraphAsync(IGraphStatement, String)
Executes a graph statement asynchronously with the provided graph execution profile. The graph execution profile must have been added previously to the DseCluster using WithExecutionProfiles(Action<IExecutionProfileOptions>).
Declaration
Task<GraphResultSet> ExecuteGraphAsync(IGraphStatement statement, string executionProfileName)
Parameters
Type | Name | Description |
---|---|---|
IGraphStatement | statement | The graph statement containing the query |
System.String | executionProfileName | The graph execution profile name to use while executing this statement. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<GraphResultSet> |
Examples
Task<GraphResultSet$gt; task = session.ExecuteGraphAsync(new SimpleGraphStatement("g.V()"), "graphProfile");