Class CqlCommand
Represents a Linq query (UPDATE/INSERT/DELETE) that gets evaluated as a CQL statement.
Inheritance
object
CqlCommand
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Assembly: Cassandra.dll
Syntax
public abstract class CqlCommand : SimpleStatement, IStatement
Fields
_timestamp
Declaration
protected DateTimeOffset? _timestamp
Field Value
Type |
Description |
DateTimeOffset? |
|
_ttl
Declaration
Field Value
Properties
Expression
Declaration
public Expression Expression { get; }
Property Value
Type |
Description |
Expression |
|
QueryAbortTimeout
Declaration
protected int QueryAbortTimeout { get; }
Property Value
QueryString
Declaration
public override string QueryString { get; }
Property Value
Overrides
QueryTrace
After being executed, it retrieves the trace of the CQL query.
Use EnableTracing(bool) to enable tracing.
Note that enabling query trace introduces server-side overhead by storing request information, so it's
recommended that you only enable query tracing when trying to identify possible issues / debugging.
Declaration
public QueryTrace QueryTrace { get; protected set; }
Property Value
QueryValues
Declaration
public override object[] QueryValues { get; }
Property Value
Type |
Description |
object[] |
|
Overrides
Methods
BeginExecute(AsyncCallback, object)
Starts executing the statement async
Declaration
public virtual IAsyncResult BeginExecute(AsyncCallback callback, object state)
Parameters
Type |
Name |
Description |
AsyncCallback |
callback |
|
object |
state |
|
Returns
Type |
Description |
IAsyncResult |
|
EndExecute(IAsyncResult)
Starts the async executing of the statement
Declaration
public virtual void EndExecute(IAsyncResult ar)
Parameters
Type |
Name |
Description |
IAsyncResult |
ar |
|
Execute()
Executes the command using the ISession.
Declaration
Execute(string)
Executes the command using the ISession with the provided execution profile.
Declaration
public RowSet Execute(string executionProfile)
Parameters
Type |
Name |
Description |
string |
executionProfile |
|
Returns
ExecuteAsync()
Evaluates the Linq command and executes asynchronously the cql statement.
Declaration
public Task<RowSet> ExecuteAsync()
Returns
ExecuteAsync(string)
Evaluates the Linq command and executes asynchronously the cql statement with the provided execution profile.
Declaration
public Task<RowSet> ExecuteAsync(string executionProfile)
Parameters
Type |
Name |
Description |
string |
executionProfile |
|
Returns
GetCql(out object[])
Declaration
protected abstract string GetCql(out object[] values)
Parameters
Type |
Name |
Description |
object[] |
values |
|
Returns
GetTable()
Declaration
Returns
InitializeStatement()
Declaration
protected void InitializeStatement()
SetConsistencyLevel(ConsistencyLevel?)
Declaration
public CqlCommand SetConsistencyLevel(ConsistencyLevel? consistencyLevel)
Parameters
Returns
SetQueryTrace(QueryTrace)
Declaration
public void SetQueryTrace(QueryTrace trace)
Parameters
SetSerialConsistencyLevel(ConsistencyLevel)
Declaration
public CqlCommand SetSerialConsistencyLevel(ConsistencyLevel consistencyLevel)
Parameters
Returns
SetTimestamp(DateTimeOffset)
Sets the timestamp associated with this statement execution.
Declaration
public CqlCommand SetTimestamp(DateTimeOffset timestamp)
Parameters
Type |
Name |
Description |
DateTimeOffset |
timestamp |
|
Returns
SetTTL(int)
Sets the time for data in a column to expire (TTL) for INSERT and UPDATE commands .
Declaration
public CqlCommand SetTTL(int seconds)
Parameters
Type |
Name |
Description |
int |
seconds |
Amount of seconds
|
Returns
Implements