Class CqlQueryBase<TEntity>
Inheritance
object
CqlQueryBase<TEntity>
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 CqlQueryBase<TEntity> : Statement, IStatement
Type Parameters
Properties
ElementType
Declaration
public Type ElementType { get; }
Property Value
Expression
Declaration
public Expression Expression { get; }
Property Value
| Type |
Description |
| Expression |
|
Keyspace
Returns the keyspace this query operates on.
Note that not all Statement implementations specify on which keyspace they operate on
so this method can return null. If null, it will operate on the default keyspace set during initialization (if it was set).
The keyspace returned is used as a hint for token-aware routing.
Declaration
public override string Keyspace { get; }
Property Value
Overrides
Remarks
QueryAbortTimeout
Declaration
protected int QueryAbortTimeout { get; }
Property Value
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
RoutingKey
Declaration
public override RoutingKey RoutingKey { get; }
Property Value
Overrides
Methods
BeginExecute(AsyncCallback, object)
Declaration
public IAsyncResult BeginExecute(AsyncCallback callback, object state)
Parameters
| Type |
Name |
Description |
| AsyncCallback |
callback |
|
| object |
state |
|
Returns
| Type |
Description |
| IAsyncResult |
|
EndExecute(IAsyncResult)
Declaration
public IEnumerable<TEntity> EndExecute(IAsyncResult ar)
Parameters
| Type |
Name |
Description |
| IAsyncResult |
ar |
|
Returns
| Type |
Description |
| IEnumerable<TEntity> |
|
Execute()
Evaluates the Linq query, executes the cql statement and adapts the results.
Declaration
public IEnumerable<TEntity> Execute()
Returns
| Type |
Description |
| IEnumerable<TEntity> |
|
Execute(string)
Evaluates the Linq query, executes the cql statement with the provided execution profile and adapts the results.
Declaration
public IEnumerable<TEntity> Execute(string executionProfile)
Parameters
| Type |
Name |
Description |
| string |
executionProfile |
|
Returns
| Type |
Description |
| IEnumerable<TEntity> |
|
ExecuteAsync()
Evaluates the Linq query, executes asynchronously the cql statement and adapts the results.
Declaration
public Task<IEnumerable<TEntity>> ExecuteAsync()
Returns
| Type |
Description |
| Task<IEnumerable<TEntity>> |
|
ExecuteAsync(string)
Evaluates the Linq query, executes asynchronously the cql statement with the provided execution profile
and adapts the results.
Declaration
public Task<IEnumerable<TEntity>> ExecuteAsync(string executionProfile)
Parameters
| Type |
Name |
Description |
| string |
executionProfile |
|
Returns
| Type |
Description |
| Task<IEnumerable<TEntity>> |
|
GetCql(out object[])
Declaration
protected abstract string GetCql(out object[] values)
Parameters
| Type |
Name |
Description |
| object[] |
values |
|
Returns
GetTable()
Declaration
Returns
InternalExecuteWithProfileAsync(string, string, object[])
Declaration
protected Task<RowSet> InternalExecuteWithProfileAsync(string executionProfile, string cqlQuery, object[] values)
Parameters
| Type |
Name |
Description |
| string |
executionProfile |
|
| string |
cqlQuery |
|
| object[] |
values |
|
Returns
Implements