Interface ICqlQueryAsyncClient
A client capable of querying (reading) POCOs from a Cassandra cluster.
Assembly: Dse.dll
Syntax
public interface ICqlQueryAsyncClient
Methods
FetchAsync<T>(Cql)
Gets a list of T from Cassandra using the CQL statement specified.
Declaration
Task<IEnumerable<T>> FetchAsync<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<T>> |
|
Type Parameters
FetchAsync<T>(CqlQueryOptions)
Gets a list of all T from Cassandra.
Declaration
Task<IEnumerable<T>> FetchAsync<T>(CqlQueryOptions queryOptions = null)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<T>> |
|
Type Parameters
FetchAsync<T>(String, Object[])
Gets a list of T from Cassandra using the CQL statement and parameter values specified.
Declaration
Task<IEnumerable<T>> FetchAsync<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
cql |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<T>> |
|
Type Parameters
FetchPageAsync<T>(Cql)
Gets a paged list of T results from Cassandra.
Suitable for manually page through all the results of a query.
Declaration
Task<IPage<T>> FetchPageAsync<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<IPage<T>> |
|
Type Parameters
FetchPageAsync<T>(CqlQueryOptions)
Gets a paged list of T results from Cassandra using the CQL statement specified.
Suitable for manually page through all the results of a query.
Declaration
Task<IPage<T>> FetchPageAsync<T>(CqlQueryOptions queryOptions = null)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<IPage<T>> |
|
Type Parameters
FetchPageAsync<T>(Int32, Byte[], String, Object[])
Gets a paged list of T results from Cassandra.
Suitable for manually page through all the results of a query.
Declaration
Task<IPage<T>> FetchPageAsync<T>(int pageSize, byte[] pagingState, string query, object[] args)
Parameters
Type |
Name |
Description |
System.Int32 |
pageSize |
Amount of items to return
|
System.Byte[] |
pagingState |
The token representing the state of the result page. To get the first page, use a null value.
|
System.String |
query |
Cql query
|
System.Object[] |
args |
Query parameters
|
Returns
Type |
Description |
System.Threading.Tasks.Task<IPage<T>> |
|
Type Parameters
FirstAsync<T>(Cql)
Gets the first T from Cassandra using the CQL specified. Will throw if no records are returned.
Declaration
Task<T> FirstAsync<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
FirstAsync<T>(String, Object[])
Gets the first T from Cassandra using the CQL statement and parameter values specified. Will throw if no
records are returned.
Declaration
Task<T> FirstAsync<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
cql |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
FirstOrDefaultAsync<T>(Cql)
Gets the first T from Cassandra using the CQL specified. Will return the default value of T if no records
are found.
Declaration
Task<T> FirstOrDefaultAsync<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
FirstOrDefaultAsync<T>(String, Object[])
Gets the first T from Cassandra using the CQL statement and parameter values specified. Will return the
default value of T is no records are found.
Declaration
Task<T> FirstOrDefaultAsync<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
cql |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
SingleAsync<T>(Cql)
Gets a single T from Cassandra using the CQL statement specified. Will throw if no records or more than one
record is returned.
Declaration
Task<T> SingleAsync<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
SingleAsync<T>(String, Object[])
Gets a single T from Cassandra using the CQL statement and parameter values specified. Will throw if
no records or more than one record is returned.
Declaration
Task<T> SingleAsync<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
cql |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
SingleOrDefaultAsync<T>(Cql)
Gets a single T from Cassandra using the CQL statement specified. Will return the default value of T if no
records are found. Will throw if more than one record is returned.
Declaration
Task<T> SingleOrDefaultAsync<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters
SingleOrDefaultAsync<T>(String, Object[])
Gets a single T from Cassandra using the CQL statement and parameter values specified. Will return the
default value of T if no records are found. Will throw if more than one record is returned.
Declaration
Task<T> SingleOrDefaultAsync<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
cql |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<T> |
|
Type Parameters