Class GraphStatement
Base class for graph statements.
Inheritance
object
GraphStatement
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Assembly: Cassandra.dll
Syntax
public abstract class GraphStatement : IGraphStatement
Properties
ConsistencyLevel
Returns the consistency level to use for this statement.
Declaration
public ConsistencyLevel? ConsistencyLevel { get; protected set; }
Property Value
GraphAlias
Declaration
public string GraphAlias { get; protected set; }
Property Value
GraphLanguage
Gets the graph language to use with this statement.
Declaration
public string GraphLanguage { get; protected set; }
Property Value
GraphName
Gets the graph name to use with this statement.
Declaration
public string GraphName { get; protected set; }
Property Value
GraphProtocolVersion
Declaration
public GraphProtocol? GraphProtocolVersion { get; protected set; }
Property Value
GraphReadConsistencyLevel
Gets the consistency level used for read graph queries.
Declaration
public ConsistencyLevel? GraphReadConsistencyLevel { get; protected set; }
Property Value
GraphSource
Gets the graph traversal source name to use with this statement.
Declaration
public string GraphSource { get; protected set; }
Property Value
GraphWriteConsistencyLevel
Gets the consistency level used for write graph queries.
Declaration
public ConsistencyLevel? GraphWriteConsistencyLevel { get; protected set; }
Property Value
IsSystemQuery
Determines whether this statement is marked as a system query.
Declaration
public bool IsSystemQuery { get; protected set; }
Property Value
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
public int ReadTimeoutMillis { get; protected set; }
Property Value
Timestamp
Gets the default timestamp for this query.
Declaration
public DateTimeOffset? Timestamp { get; protected set; }
Property Value
Type |
Description |
DateTimeOffset? |
|
Methods
IsAnonymous(object)
Determines whether the object is anonymous.
Declaration
protected bool IsAnonymous(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Exceptions
Type |
Condition |
System.ArgumentNullException |
|
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
public IGraphStatement SetConsistencyLevel(ConsistencyLevel consistency)
Parameters
Returns
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
public IGraphStatement SetGraphLanguage(string language)
Parameters
Type |
Name |
Description |
string |
language |
|
Returns
SetGraphName(string)
Sets the graph name to use in graph queries.
If you don't call this method, it is left unset.
Declaration
public IGraphStatement SetGraphName(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
SetGraphProtocolVersion(GraphProtocol)
Declaration
public IGraphStatement SetGraphProtocolVersion(GraphProtocol graphProtocol)
Parameters
Returns
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
public IGraphStatement SetGraphReadConsistencyLevel(ConsistencyLevel consistency)
Parameters
Returns
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
public IGraphStatement SetGraphSource(string source)
Parameters
Type |
Name |
Description |
string |
source |
|
Returns
SetGraphSourceAnalytics()
Sets the graph source to the server-defined analytic traversal source ("a") for this statement.
Declaration
public IGraphStatement SetGraphSourceAnalytics()
Returns
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
public IGraphStatement SetGraphWriteConsistencyLevel(ConsistencyLevel consistency)
Parameters
Returns
SetReadTimeoutMillis(int)
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
public IGraphStatement SetReadTimeoutMillis(int timeout)
Parameters
Type |
Name |
Description |
int |
timeout |
Timeout in milliseconds.
|
Returns
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
public IGraphStatement SetSystemQuery()
Returns
SetTimestamp(DateTimeOffset)
Sets the timestamp associated with this query.
Declaration
public IGraphStatement SetTimestamp(DateTimeOffset timestamp)
Parameters
Type |
Name |
Description |
DateTimeOffset |
timestamp |
|
Returns
Implements