Interface ICqlQueryAsyncClient
A client capable of querying (reading) POCOs from a Cassandra cluster.
Assembly: Cassandra.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 |
Task<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 |
Task<IEnumerable<T>> |
|
Type Parameters
FetchAsync<T>(string, params 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 |
string |
cql |
|
object[] |
args |
|
Returns
Type |
Description |
Task<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 |
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 |
Task<IPage<T>> |
|
Type Parameters
FetchPageAsync<T>(int, 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 |
int |
pageSize |
Amount of items to return
|
byte[] |
pagingState |
The token representing the state of the result page. To get the first page, use a null value.
|
string |
query |
Cql query
|
object[] |
args |
Query parameters
|
Returns
Type |
Description |
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 Parameters
FirstAsync<T>(string, params 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 |
string |
cql |
|
object[] |
args |
|
Returns
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 Parameters
FirstOrDefaultAsync<T>(string, params 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 |
string |
cql |
|
object[] |
args |
|
Returns
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 Parameters
SingleAsync<T>(string, params 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 |
string |
cql |
|
object[] |
args |
|
Returns
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 Parameters
SingleOrDefaultAsync<T>(string, params 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 |
string |
cql |
|
object[] |
args |
|
Returns
Type Parameters