Interface ICqlQueryClient
The contract for synchronous read operations.
Assembly: Cassandra.dll
Syntax
public interface ICqlQueryClient
Methods
Fetch<T>(Cql)
Gets a list of T from Cassandra using the CQL statement specified.
Declaration
IEnumerable<T> Fetch<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
Fetch<T>(CqlQueryOptions)
Gets a list of all T from Cassandra.
Declaration
IEnumerable<T> Fetch<T>(CqlQueryOptions queryOptions = null)
Parameters
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
Fetch<T>(string, params object[])
Gets a list of T from Cassandra using the CQL statement and parameter values specified.
Declaration
IEnumerable<T> Fetch<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
string |
cql |
|
object[] |
args |
|
Returns
Type |
Description |
IEnumerable<T> |
|
Type Parameters
FetchPage<T>(Cql)
Gets a paged list of T results from Cassandra.
Suitable for manually page through all the results of a query.
Declaration
IPage<T> FetchPage<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type |
Description |
IPage<T> |
|
Type Parameters
FetchPage<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
IPage<T> FetchPage<T>(CqlQueryOptions queryOptions = null)
Parameters
Returns
Type |
Description |
IPage<T> |
|
Type Parameters
FetchPage<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
IPage<T> FetchPage<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 |
IPage<T> |
|
Type Parameters
First<T>(Cql)
Gets the first T from Cassandra using the CQL statement specified. Will throw if no records are returned.
Declaration
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type Parameters
First<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
T First<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
string |
cql |
|
object[] |
args |
|
Returns
Type Parameters
FirstOrDefault<T>(Cql)
Gets the first T from Cassandra using the CQL statement specified. Will return the default value of T if
no records are found.
Declaration
T FirstOrDefault<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type Parameters
FirstOrDefault<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
T FirstOrDefault<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
string |
cql |
|
object[] |
args |
|
Returns
Type Parameters
Single<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
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type Parameters
Single<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
T Single<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
string |
cql |
|
object[] |
args |
|
Returns
Type Parameters
SingleOrDefault<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
T SingleOrDefault<T>(Cql cql)
Parameters
Type |
Name |
Description |
Cql |
cql |
|
Returns
Type Parameters
SingleOrDefault<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
T SingleOrDefault<T>(string cql, params object[] args)
Parameters
Type |
Name |
Description |
string |
cql |
|
object[] |
args |
|
Returns
Type Parameters