Interface IGraphStatement
Represents a graph statement.
Namespace: Dse.Graph
Assembly: Dse.dll
Syntax
public interface IGraphStatement
Properties
ConsistencyLevel
Returns the consistency level to use for this statement.
Declaration
ConsistencyLevel? ConsistencyLevel { get; }
Property Value
Type | Description |
---|---|
System.Nullable<ConsistencyLevel> |
GraphLanguage
Gets the graph language to use with this statement.
Declaration
string GraphLanguage { get; }
Property Value
Type | Description |
---|---|
System.String |
GraphName
Gets the graph name to use with this statement.
Declaration
string GraphName { get; }
Property Value
Type | Description |
---|---|
System.String |
GraphReadConsistencyLevel
Gets the consistency level used for read graph queries.
Declaration
ConsistencyLevel? GraphReadConsistencyLevel { get; }
Property Value
Type | Description |
---|---|
System.Nullable<ConsistencyLevel> |
GraphSource
Gets the graph traversal source name to use with this statement.
Declaration
string GraphSource { get; }
Property Value
Type | Description |
---|---|
System.String |
GraphWriteConsistencyLevel
Gets the consistency level used for write graph queries.
Declaration
ConsistencyLevel? GraphWriteConsistencyLevel { get; }
Property Value
Type | Description |
---|---|
System.Nullable<ConsistencyLevel> |
IsSystemQuery
Determines whether this statement is marked as a system query.
Declaration
bool IsSystemQuery { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ReadTimeoutMillis
Gets the ReadTimeout for the statement that, when is different than 0, overrides ReadTimeoutMillis.
Use System.Threading.Timeout.Infinite to disable timeouts for this Statement.
Declaration
int ReadTimeoutMillis { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Timestamp
Gets the default timestamp for this query.
Declaration
DateTimeOffset? Timestamp { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTimeOffset> |
Methods
SetConsistencyLevel(ConsistencyLevel)
Sets the consistency level to use for this statement.
This setting will affect the general consistency when executing the gremlin query. However executing a gremlin query on the server side is going to involve the execution of CQL queries to the persistence engine that is Cassandra. Those queries can be both reads and writes and both will have a settable consistency level. Setting only this property will indicate to the server to use this consistency level for both reads and writes in Cassandra. Read or write consistency level can be set separately with respectively SetGraphReadConsistencyLevel(ConsistencyLevel) and SetGraphWriteConsistencyLevel(ConsistencyLevel) will override the consistency set here.
Declaration
IGraphStatement SetConsistencyLevel(ConsistencyLevel consistency)
Parameters
Type | Name | Description |
---|---|---|
ConsistencyLevel | consistency |
Returns
Type | Description |
---|---|
IGraphStatement |
SetGraphLanguage(String)
Sets the graph language to use with this statement.
This property is not required; if it is not set, the default Language will be used when executing the statement.
Declaration
IGraphStatement SetGraphLanguage(string language)
Parameters
Type | Name | Description |
---|---|---|
System.String | language |
Returns
Type | Description |
---|---|
IGraphStatement |
SetGraphName(String)
Sets the graph name to use in graph queries. If you don't call this method, it is left unset.
Declaration
IGraphStatement SetGraphName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
IGraphStatement |
SetGraphReadConsistencyLevel(ConsistencyLevel)
Sets the consistency level used for the graph read query.
This setting will override the consistency level set with SetConsistencyLevel(ConsistencyLevel) only for the READ part of the graph query.
Declaration
IGraphStatement SetGraphReadConsistencyLevel(ConsistencyLevel consistency)
Parameters
Type | Name | Description |
---|---|---|
ConsistencyLevel | consistency |
Returns
Type | Description |
---|---|
IGraphStatement |
SetGraphSource(String)
Sets the graph traversal source name to use in graph queries. If you don't call this method, it defaults to Source.
Declaration
IGraphStatement SetGraphSource(string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
IGraphStatement |
SetGraphSourceAnalytics()
Sets the graph source to the server-defined analytic traversal source ("a") for this statement.
Declaration
IGraphStatement SetGraphSourceAnalytics()
Returns
Type | Description |
---|---|
IGraphStatement |
SetGraphWriteConsistencyLevel(ConsistencyLevel)
Sets the consistency level used for the graph write query.
This setting will override the consistency level set with SetConsistencyLevel(ConsistencyLevel) only for the WRITE part of the graph query.
Declaration
IGraphStatement SetGraphWriteConsistencyLevel(ConsistencyLevel consistency)
Parameters
Type | Name | Description |
---|---|---|
ConsistencyLevel | consistency |
Returns
Type | Description |
---|---|
IGraphStatement |
SetReadTimeoutMillis(Int32)
Sets the per-host read timeout in milliseconds for this statement.
Use System.Threading.Timeout.Infinite to disable timeouts for this Statement.
Use zero to use the default value specified in the ReadTimeoutMillis.
Declaration
IGraphStatement SetReadTimeoutMillis(int timeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | timeout | Timeout in milliseconds. |
Returns
Type | Description |
---|---|
IGraphStatement | This instance |
SetSystemQuery()
Forces this statement to use no graph name, even if a default graph name was defined with SetName(String).
If a graph name was previously defined on this statement, it will be reset.
Declaration
IGraphStatement SetSystemQuery()
Returns
Type | Description |
---|---|
IGraphStatement |
SetTimestamp(DateTimeOffset)
Sets the timestamp associated with this query.
Declaration
IGraphStatement SetTimestamp(DateTimeOffset timestamp)
Parameters
Type | Name | Description |
---|---|---|
System.DateTimeOffset | timestamp |
Returns
Type | Description |
---|---|
IGraphStatement |
ToIStatement(GraphOptions)
Returns the IStatement representation of the Graph statement.
Declaration
IStatement ToIStatement(GraphOptions options)
Parameters
Type | Name | Description |
---|---|---|
GraphOptions | options |
Returns
Type | Description |
---|---|
IStatement |
Remarks
Used by the DSE driver to translate between this statement and Core driver statement instances