Class CqlCommand
Represents a Linq query (UPDATE/INSERT/DELETE) that gets evaluated as a CQL statement.
Inheritance
System.Object
CqlCommand
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Dse.dll
Syntax
public abstract class CqlCommand : SimpleStatement, IInternalStatement, IStatement
Fields
_timestamp
Declaration
protected DateTimeOffset? _timestamp
Field Value
Type |
Description |
System.Nullable<System.DateTimeOffset> |
|
_ttl
Declaration
Field Value
Type |
Description |
System.Nullable<System.Int32> |
|
Properties
Expression
Declaration
public Expression Expression { get; }
Property Value
Type |
Description |
System.Linq.Expressions.Expression |
|
QueryAbortTimeout
Declaration
protected int QueryAbortTimeout { get; }
Property Value
Type |
Description |
System.Int32 |
|
QueryString
Declaration
public override string QueryString { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
QueryTrace
After being executed, it retrieves the trace of the CQL query.
Use EnableTracing(Boolean) 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 |
System.Object[] |
|
Overrides
Methods
BeginExecute(AsyncCallback, Object)
Starts executing the statement async
Declaration
public virtual IAsyncResult BeginExecute(AsyncCallback callback, object state)
Parameters
Type |
Name |
Description |
System.AsyncCallback |
callback |
|
System.Object |
state |
|
Returns
Type |
Description |
System.IAsyncResult |
|
EndExecute(IAsyncResult)
Starts the async executing of the statement
Declaration
public virtual void EndExecute(IAsyncResult ar)
Parameters
Type |
Name |
Description |
System.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 |
System.String |
executionProfile |
|
Returns
ExecuteAsync()
Evaluates the Linq command and executes asynchronously the cql statement.
Declaration
public Task<RowSet> ExecuteAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task<RowSet> |
|
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 |
System.String |
executionProfile |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<RowSet> |
|
GetCql(out Object[])
Declaration
protected abstract string GetCql(out object[] values)
Parameters
Type |
Name |
Description |
System.Object[] |
values |
|
Returns
Type |
Description |
System.String |
|
GetTable()
Declaration
Returns
InitializeStatement()
Declaration
protected void InitializeStatement()
SetConsistencyLevel(Nullable<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 |
System.DateTimeOffset |
timestamp |
|
Returns
SetTTL(Int32)
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 |
System.Int32 |
seconds |
Amount of seconds
|
Returns
Implements