public interface CqlOperations
Modifier and Type | Method and Description |
---|---|
long |
count(CqlIdentifier tableName)
Counts all rows for given table
|
long |
count(String tableName)
Counts all rows for given table
|
List<RingMember> |
describeRing()
Describe the current Ring.
|
<T> Collection<T> |
describeRing(HostMapper<T> hostMapper)
Describe the current Ring.
|
com.datastax.driver.core.ResultSet |
execute(AlterKeyspaceSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
com.datastax.driver.core.ResultSet |
execute(AlterTableSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
void |
execute(com.datastax.driver.core.querybuilder.Batch batch)
Executes the supplied Batch Query and returns nothing.
|
com.datastax.driver.core.ResultSet |
execute(CreateIndexSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
com.datastax.driver.core.ResultSet |
execute(CreateKeyspaceSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
com.datastax.driver.core.ResultSet |
execute(CreateTableSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
void |
execute(com.datastax.driver.core.querybuilder.Delete delete)
Executes the supplied Delete Query and returns nothing.
|
com.datastax.driver.core.ResultSet |
execute(DropIndexSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
com.datastax.driver.core.ResultSet |
execute(DropKeyspaceSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
com.datastax.driver.core.ResultSet |
execute(DropTableSpecification specification)
Convenience method to convert the given specification to CQL and execute it.
|
void |
execute(com.datastax.driver.core.querybuilder.Insert insert)
Executes the supplied Insert Query and returns nothing.
|
<T> T |
execute(PreparedStatementCreator psc,
PreparedStatementCallback<T> action)
Uses the provided
PreparedStatementCreator to create a PreparedStatement in the current
Session , then passes that PreparedStatement to the given PreparedStatementCallback . |
<T> T |
execute(SessionCallback<T> sessionCallback)
Executes the supplied
SessionCallback in the current Template Session. |
void |
execute(com.datastax.driver.core.Statement query)
Executes the supplied Query and returns nothing.
|
void |
execute(String cql)
Executes the supplied CQL Query and returns nothing.
|
<T> T |
execute(String cql,
PreparedStatementCallback<T> action)
Creates and caches a
PreparedStatement from the given CQL, invokes the PreparedStatementCallback
with that PreparedStatement , then returns the value returned by the PreparedStatementCallback . |
void |
execute(String cql,
QueryOptions options)
Executes the supplied CQL Query and returns nothing.
|
void |
execute(com.datastax.driver.core.querybuilder.Truncate truncate)
Executes the supplied Truncate Query and returns nothing.
|
void |
execute(com.datastax.driver.core.querybuilder.Update update)
Executes the supplied Update Query and returns nothing.
|
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(com.datastax.driver.core.querybuilder.Batch batch)
Executes the supplied CQL Batch Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.querybuilder.Batch batch,
AsynchronousQueryListener listener) |
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(com.datastax.driver.core.querybuilder.Delete delete)
Executes the supplied CQL Delete Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.querybuilder.Delete delete,
AsynchronousQueryListener listener) |
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(com.datastax.driver.core.querybuilder.Insert insert)
Executes the supplied CQL Insert Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.querybuilder.Insert insert,
AsynchronousQueryListener listener) |
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(com.datastax.driver.core.Statement query)
Executes the supplied CQL Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.Statement query,
AsynchronousQueryListener listener)
Executes the supplied CQL Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.Statement query,
AsynchronousQueryListener listener,
Executor executor)
Executes the supplied CQL Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.Statement query,
Runnable runnable)
Executes the supplied CQL Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.Statement query,
Runnable runnable,
Executor executor)
Executes the supplied CQL Query Asynchronously and returns nothing.
|
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(String cql)
Executes the supplied Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(String cql,
AsynchronousQueryListener listener)
Executes the supplied Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(String cql,
AsynchronousQueryListener listener,
Executor executor)
Executes the supplied Query Asynchronously and returns nothing.
|
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(String cql,
QueryOptions options)
Executes the supplied Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(String cql,
Runnable listener)
Executes the supplied Query Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(String cql,
Runnable listener,
Executor executor)
Executes the supplied Query Asynchronously and returns nothing.
|
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(com.datastax.driver.core.querybuilder.Truncate truncate)
Executes the supplied CQL Truncate Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.querybuilder.Truncate truncate,
AsynchronousQueryListener listener) |
com.datastax.driver.core.ResultSetFuture |
executeAsynchronously(com.datastax.driver.core.querybuilder.Update update)
Executes the supplied CQL Update Asynchronously and returns nothing.
|
Cancellable |
executeAsynchronously(com.datastax.driver.core.querybuilder.Update update,
AsynchronousQueryListener listener) |
com.datastax.driver.core.ResultSet |
getResultSetUninterruptibly(com.datastax.driver.core.ResultSetFuture rsf)
Convenient method that delegates to
ResultSetFuture.getUninterruptibly() but translates exceptions if any
are thrown. |
com.datastax.driver.core.ResultSet |
getResultSetUninterruptibly(com.datastax.driver.core.ResultSetFuture rsf,
long millis)
Convenient method that delegates to
ResultSetFuture.getUninterruptibly() but translates exceptions if any
are thrown. |
com.datastax.driver.core.ResultSet |
getResultSetUninterruptibly(com.datastax.driver.core.ResultSetFuture rsf,
long timeout,
TimeUnit unit)
Convenient method that delegates to
ResultSetFuture.getUninterruptibly() but translates exceptions if any
are thrown. |
com.datastax.driver.core.Session |
getSession()
Get the current Session used for operations in the implementing class.
|
void |
ingest(String cql,
List<List<?>> rows)
This is an operation designed for high performance writes.
|
void |
ingest(String cql,
List<List<?>> rows,
WriteOptions options)
This is an operation designed for high performance writes.
|
void |
ingest(String cql,
Object[][] rows)
This is an operation designed for high performance writes.
|
void |
ingest(String cql,
Object[][] rows,
WriteOptions options)
This is an operation designed for high performance writes.
|
void |
ingest(String cql,
RowIterator rowIterator)
This is an operation designed for high performance writes.
|
void |
ingest(String cql,
RowIterator rowIterator,
WriteOptions options)
This is an operation designed for high performance writes.
|
void |
process(com.datastax.driver.core.ResultSet resultSet,
RowCallbackHandler rch)
Processes the ResultSet through the RowCallbackHandler and return nothing.
|
<T> List<T> |
process(com.datastax.driver.core.ResultSet resultSet,
RowMapper<T> rowMapper)
Processes the ResultSet through the RowMapper and returns the List of mapped Rows.
|
<T> List<T> |
processList(com.datastax.driver.core.ResultSet resultSet,
Class<T> elementType)
Process a ResultSet and convert the first column of the results to a List.
|
List<Map<String,Object>> |
processListOfMap(com.datastax.driver.core.ResultSet resultSet)
Process a ResultSet and convert it to a List of Maps with column/value.
|
Map<String,Object> |
processMap(com.datastax.driver.core.ResultSet resultSet)
Process a ResultSet with ONE Row and convert to a Map.
|
<T> T |
processOne(com.datastax.driver.core.ResultSet resultSet,
Class<T> requiredType)
Process a ResultSet, trying to convert the first columns of the first Row to Class
|
<T> T |
processOne(com.datastax.driver.core.ResultSet resultSet,
RowMapper<T> rowMapper)
Process
ResultSet with RowMapper . |
<T> T |
query(PreparedStatementCreator psc,
PreparedStatementBinder psb,
ResultSetExtractor<T> rse)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
<T> T |
query(PreparedStatementCreator psc,
PreparedStatementBinder psb,
ResultSetExtractor<T> rse,
QueryOptions options)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
void |
query(PreparedStatementCreator psc,
PreparedStatementBinder psb,
RowCallbackHandler rch)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
void |
query(PreparedStatementCreator psc,
PreparedStatementBinder psb,
RowCallbackHandler rch,
QueryOptions options)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
<T> List<T> |
query(PreparedStatementCreator psc,
PreparedStatementBinder psb,
RowMapper<T> rowMapper)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
<T> List<T> |
query(PreparedStatementCreator psc,
PreparedStatementBinder psb,
RowMapper<T> rowMapper,
QueryOptions options)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
<T> T |
query(PreparedStatementCreator psc,
ResultSetExtractor<T> rse)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
<T> T |
query(PreparedStatementCreator psc,
ResultSetExtractor<T> rse,
QueryOptions options)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
void |
query(PreparedStatementCreator psc,
RowCallbackHandler rch)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
void |
query(PreparedStatementCreator psc,
RowCallbackHandler rch,
QueryOptions options)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
<T> List<T> |
query(PreparedStatementCreator psc,
RowMapper<T> rowMapper)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
<T> List<T> |
query(PreparedStatementCreator psc,
RowMapper<T> rowMapper,
QueryOptions options)
Uses the provided PreparedStatementCreator to prepare a new Session call.
|
com.datastax.driver.core.ResultSet |
query(com.datastax.driver.core.querybuilder.Select select)
Executes the provided Select query and returns the
ResultSet . |
<T> T |
query(com.datastax.driver.core.querybuilder.Select select,
ResultSetExtractor<T> rse)
Executes the provided Select Query, and extracts the results with the ResultSetExtractor.
|
void |
query(com.datastax.driver.core.querybuilder.Select select,
RowCallbackHandler rch)
Executes the provided Select Query, and then processes the results with the
RowCallbackHandler . |
<T> List<T> |
query(com.datastax.driver.core.querybuilder.Select select,
RowMapper<T> rowMapper)
Executes the provided Select Query, and maps all Rows returned with the supplied RowMapper.
|
com.datastax.driver.core.ResultSet |
query(String cql)
Executes the provided CQL query and returns the
ResultSet . |
<T> T |
query(String cql,
PreparedStatementBinder psb,
ResultSetExtractor<T> rse)
Converts the CQL provided into a
CachedPreparedStatementCreator . |
<T> T |
query(String cql,
PreparedStatementBinder psb,
ResultSetExtractor<T> rse,
QueryOptions options)
Converts the CQL provided into a
CachedPreparedStatementCreator . |
void |
query(String cql,
PreparedStatementBinder psb,
RowCallbackHandler rch)
Converts the CQL provided into a
CachedPreparedStatementCreator . |
void |
query(String cql,
PreparedStatementBinder psb,
RowCallbackHandler rch,
QueryOptions options)
Converts the CQL provided into a
CachedPreparedStatementCreator . |
<T> List<T> |
query(String cql,
PreparedStatementBinder psb,
RowMapper<T> rowMapper)
Converts the CQL provided into a
CachedPreparedStatementCreator . |
<T> List<T> |
query(String cql,
PreparedStatementBinder psb,
RowMapper<T> rowMapper,
QueryOptions options)
Converts the CQL provided into a
CachedPreparedStatementCreator . |
com.datastax.driver.core.ResultSet |
query(String cql,
QueryOptions options)
Executes the provided CQL query with the given
QueryOptions and returns the ResultSet . |
<T> T |
query(String cql,
ResultSetExtractor<T> rse)
Executes the provided CQL Query, and extracts the results with the ResultSetExtractor.
|
<T> T |
query(String cql,
ResultSetExtractor<T> rse,
QueryOptions options)
Executes the provided CQL Query, and extracts the results with the ResultSetExtractor.
|
void |
query(String cql,
RowCallbackHandler rch)
Executes the provided CQL Query, and then processes the results with the
RowCallbackHandler . |
void |
query(String cql,
RowCallbackHandler rch,
QueryOptions options)
Executes the provided CQL Query, and then processes the results with the
RowCallbackHandler . |
<T> List<T> |
query(String cql,
RowMapper<T> rowMapper)
Executes the provided CQL Query, and maps all Rows returned with the supplied RowMapper.
|
<T> List<T> |
query(String cql,
RowMapper<T> rowMapper,
QueryOptions options)
Executes the provided CQL Query, and maps all Rows returned with the supplied RowMapper.
|
com.datastax.driver.core.ResultSetFuture |
queryAsynchronously(com.datastax.driver.core.querybuilder.Select select)
Executes the provided CQL Select and returns the ResultSetFuture for user processing.
|
Cancellable |
queryAsynchronously(com.datastax.driver.core.querybuilder.Select select,
AsynchronousQueryListener listener)
Executes the provided CQL Select with the provided listener.
|
Cancellable |
queryAsynchronously(com.datastax.driver.core.querybuilder.Select select,
AsynchronousQueryListener listener,
Executor executor)
Executes the provided Select Query with the provided listener and executor.
|
Cancellable |
queryAsynchronously(com.datastax.driver.core.querybuilder.Select select,
Runnable listener)
Executes the provided CQL Select with the provided
Runnable , which is started after the query has
completed. |
Cancellable |
queryAsynchronously(com.datastax.driver.core.querybuilder.Select select,
Runnable listener,
Executor executor)
Executes the provided CQL Select with the provided Executor and Runnable implementations.
|
com.datastax.driver.core.ResultSetFuture |
queryAsynchronously(String cql)
Executes the provided CQL Query and returns the ResultSetFuture for user processing.
|
Cancellable |
queryAsynchronously(String cql,
AsynchronousQueryListener listener)
Executes the provided CQL Query with the provided listener.
|
Cancellable |
queryAsynchronously(String cql,
AsynchronousQueryListener listener,
Executor executor)
Executes the provided CQL Query with the provided listener and executor.
|
Cancellable |
queryAsynchronously(String cql,
AsynchronousQueryListener listener,
QueryOptions options)
Executes the provided CQL Query with the provided Listener and Query Options.
|
Cancellable |
queryAsynchronously(String cql,
AsynchronousQueryListener listener,
QueryOptions options,
Executor executor)
Executes the provided CQL Query with the provided Listener, Executor and Query Options.
|
com.datastax.driver.core.ResultSetFuture |
queryAsynchronously(String cql,
QueryOptions options)
Executes the provided CQL Query and returns the ResultSetFuture for user processing.
|
<T> T |
queryAsynchronously(String cql,
ResultSetExtractor<T> rse,
Long timeout,
TimeUnit timeUnit)
Executes the provided CQL Query, and extracts the results with the ResultSetExtractor.
|
<T> T |
queryAsynchronously(String cql,
ResultSetExtractor<T> rse,
Long timeout,
TimeUnit timeUnit,
QueryOptions options)
Executes the provided CQL Query, and extracts the results with the ResultSetExtractor.
|
Cancellable |
queryAsynchronously(String cql,
Runnable listener)
Executes the provided CQL Query with the provided
Runnable , which is started after the query has completed. |
Cancellable |
queryAsynchronously(String cql,
Runnable listener,
Executor executor)
Executes the provided CQL Query with the provided Executor and Runnable implementations.
|
Cancellable |
queryAsynchronously(String cql,
Runnable listener,
QueryOptions options)
Executes the provided CQL Query with the Runnable implementations using the Query Options.
|
Cancellable |
queryAsynchronously(String cql,
Runnable listener,
QueryOptions options,
Executor executor)
Executes the provided CQL Query with the provided Executor and Runnable implementations.
|
<T> List<T> |
queryForList(com.datastax.driver.core.querybuilder.Select select,
Class<T> elementType)
Executes the provided Select Query and returns all values in the first column of the Results as a List of the Type
in the second argument.
|
<T> List<T> |
queryForList(String cql,
Class<T> elementType)
Executes the provided CQL and returns all values in the first column of the Results as a List of the Type in the
second argument.
|
<T> Cancellable |
queryForListAsynchronously(com.datastax.driver.core.querybuilder.Select select,
Class<T> elementType,
QueryForListListener<T> listener)
Executes the provided
Select query asynchronously and returns all values in the first column of the results
as a List of the type in the second argument. |
<T> Cancellable |
queryForListAsynchronously(String select,
Class<T> elementType,
QueryForListListener<T> listener)
Executes the provided
Select query asynchronously and returns all values in the first column of the results
as a List of the type in the second argument. |
List<Map<String,Object>> |
queryForListOfMap(com.datastax.driver.core.querybuilder.Select select)
Executes the provided Select Query and converts the results to a basic List of Maps.
|
List<Map<String,Object>> |
queryForListOfMap(String cql)
Executes the provided CQL and converts the results to a basic List of Maps.
|
Cancellable |
queryForListOfMapAsynchronously(com.datastax.driver.core.querybuilder.Select select,
QueryForListListener<Map<String,Object>> listener)
|
Cancellable |
queryForListOfMapAsynchronously(String cql,
QueryForListListener<Map<String,Object>> listener)
|
Cancellable |
queryForListOfMapAsynchronously(String cql,
QueryForListListener<Map<String,Object>> listener,
QueryOptions options)
|
Map<String,Object> |
queryForMap(com.datastax.driver.core.querybuilder.Select select)
Executes the provided Select Query and maps ONE Row to a basic Map of Strings and Objects.
|
Map<String,Object> |
queryForMap(String cql)
Executes the provided CQL Query and maps ONE Row to a basic Map of Strings and Objects.
|
Cancellable |
queryForMapAsynchronously(com.datastax.driver.core.querybuilder.Select select,
QueryForMapListener listener)
Executes the provided
Select query asynchronously and maps the first row to a Map
<String,Object>. |
Cancellable |
queryForMapAsynchronously(String cql,
QueryForMapListener listener)
Executes the provided CQL query asynchronously and maps the first row to a
Map <String,Object>. |
Cancellable |
queryForMapAsynchronously(String cql,
QueryForMapListener listener,
QueryOptions options)
Executes the provided CQL query asynchronously and maps the first row to a
Map <String,Object>. |
<T> T |
queryForObject(com.datastax.driver.core.querybuilder.Select select,
Class<T> requiredType)
Executes the provided Select query and tries to return the first column of the first Row as a Class
|
<T> T |
queryForObject(com.datastax.driver.core.querybuilder.Select select,
RowMapper<T> rowMapper)
Executes the provided Select Query, and maps ONE Row returned with the supplied RowMapper.
|
<T> T |
queryForObject(String cql,
Class<T> requiredType)
Executes the provided query and tries to return the first column of the first Row as a Class
|
<T> T |
queryForObject(String cql,
RowMapper<T> rowMapper)
Executes the provided CQL Query, and maps ONE Row returned with the supplied RowMapper.
|
<T> Cancellable |
queryForObjectAsynchronously(com.datastax.driver.core.querybuilder.Select select,
Class<T> requiredType,
QueryForObjectListener<T> listener)
Executes the provided
Select query and returns the first column of the first Row as an object of type
T . |
<T> Cancellable |
queryForObjectAsynchronously(com.datastax.driver.core.querybuilder.Select select,
RowMapper<T> rowMapper,
QueryForObjectListener<T> listener)
Executes the provided
Select query, and maps the first row returned with the supplied RowMapper . |
<T> Cancellable |
queryForObjectAsynchronously(String cql,
Class<T> requiredType,
QueryForObjectListener<T> listener)
Executes the provided select CQL query and returns the first column of the first Row as an object of type
T . |
<T> Cancellable |
queryForObjectAsynchronously(String cql,
Class<T> requiredType,
QueryForObjectListener<T> listener,
QueryOptions options)
Executes the provided select CQL query and returns the first column of the first Row as an object of type
T . |
<T> Cancellable |
queryForObjectAsynchronously(String cql,
RowMapper<T> rowMapper,
QueryForObjectListener<T> listener)
Executes the provided string CQL query, and maps the first row returned with the supplied
RowMapper . |
<T> Cancellable |
queryForObjectAsynchronously(String cql,
RowMapper<T> rowMapper,
QueryForObjectListener<T> listener,
QueryOptions options)
Executes the provided string CQL query, and maps the first row returned with the supplied
RowMapper . |
void |
truncate(CqlIdentifier tableName)
Delete all rows in the table
|
void |
truncate(String tableName)
Delete all rows in the table
|
com.datastax.driver.core.ResultSet getResultSetUninterruptibly(com.datastax.driver.core.ResultSetFuture rsf)
ResultSetFuture.getUninterruptibly()
but translates exceptions if any
are thrown.rsf
- The ResultSetFuture
from which to get the ResultSet
.ResultSet
com.datastax.driver.core.ResultSet getResultSetUninterruptibly(com.datastax.driver.core.ResultSetFuture rsf, long millis)
ResultSetFuture.getUninterruptibly()
but translates exceptions if any
are thrown.rsf
- The ResultSetFuture
from which to get the ResultSet
.timeout
- The timeout to wait in milliseconds. A nonpositive value means wait indefinitely.ResultSet
com.datastax.driver.core.ResultSet getResultSetUninterruptibly(com.datastax.driver.core.ResultSetFuture rsf, long timeout, TimeUnit unit)
ResultSetFuture.getUninterruptibly()
but translates exceptions if any
are thrown.rsf
- The ResultSetFuture
from which to get the ResultSet
.timeout
- The timeout to wait. A nonpositive value means wait indefinitely.unit
- The TimeUnit
of the timeout.ResultSet
<T> T execute(SessionCallback<T> sessionCallback) throws DataAccessException
SessionCallback
in the current Template Session. The implementation of
SessionCallback can decide whether or not to execute()
or executeAsync()
the operation.sessionCallback
- DataAccessException
void execute(String cql) throws DataAccessException
cql
- DataAccessException
void execute(String cql, QueryOptions options) throws DataAccessException
cql
- options
- may be nullDataAccessException
void execute(com.datastax.driver.core.Statement query) throws DataAccessException
query
- The Statement
to executeDataAccessException
void execute(com.datastax.driver.core.querybuilder.Delete delete) throws DataAccessException
query
- The Delete
to executeDataAccessException
void execute(com.datastax.driver.core.querybuilder.Insert insert) throws DataAccessException
query
- The Insert
to executeDataAccessException
void execute(com.datastax.driver.core.querybuilder.Update update) throws DataAccessException
query
- The Update
to executeDataAccessException
void execute(com.datastax.driver.core.querybuilder.Batch batch) throws DataAccessException
query
- The Batch
to executeDataAccessException
void execute(com.datastax.driver.core.querybuilder.Truncate truncate) throws DataAccessException
query
- The Truncate
to executeDataAccessException
com.datastax.driver.core.ResultSetFuture executeAsynchronously(String cql) throws DataAccessException
cql
- The CQL String to executeResultSetFuture
that can be used to cancel the query.DataAccessException
com.datastax.driver.core.ResultSetFuture executeAsynchronously(String cql, QueryOptions options) throws DataAccessException
cql
- The CQL String to executeoptions
- The QueryOptions
to use. Only applies to cql statements that can use QueryOptions.ResultSetFuture
that can be used to cancel the query.DataAccessException
Cancellable executeAsynchronously(String cql, Runnable listener) throws DataAccessException
cql
- The CQL String to executelistener
- The Runnable
to register with the ResultSetFuture
Cancellable
that can be used to cancel the query.DataAccessException
for Reads
Cancellable executeAsynchronously(String cql, Runnable listener, Executor executor) throws DataAccessException
cql
- The CQL String to executelistener
- The Runnable
to register with the ResultSetFuture
executor
- The Executor
to regsiter with the ResultSetFuture
Cancellable
that can be used to cancel the query.DataAccessException
for Reads
Cancellable executeAsynchronously(String cql, AsynchronousQueryListener listener) throws DataAccessException
cql
- The CQL String to executelistener
- The AsynchronousQueryListener
to register with the ResultSetFuture
Cancellable
that can be used to cancel the query.DataAccessException
for Reads
Cancellable executeAsynchronously(String cql, AsynchronousQueryListener listener, Executor executor) throws DataAccessException
cql
- The CQL String to executelistener
- The AsynchronousQueryListener
to register with the ResultSetFuture
executor
- The Executor
to regsiter with the ResultSetFuture
Cancellable
that can be used to cancel the query.DataAccessException
for Reads
com.datastax.driver.core.ResultSetFuture executeAsynchronously(com.datastax.driver.core.querybuilder.Truncate truncate) throws DataAccessException
query
- The Truncate
to executeResultSetFuture
that can be used to cancel the query.DataAccessException
com.datastax.driver.core.ResultSetFuture executeAsynchronously(com.datastax.driver.core.querybuilder.Delete delete) throws DataAccessException
query
- The Delete
to executeResultSetFuture
that can be used to cancel the query.DataAccessException
com.datastax.driver.core.ResultSetFuture executeAsynchronously(com.datastax.driver.core.querybuilder.Insert insert) throws DataAccessException
query
- The Insert
to executeResultSetFuture
that can be used to cancel the query.DataAccessException
com.datastax.driver.core.ResultSetFuture executeAsynchronously(com.datastax.driver.core.querybuilder.Update update) throws DataAccessException
query
- The Update
to executeResultSetFuture
that can be used to cancel the query.DataAccessException
com.datastax.driver.core.ResultSetFuture executeAsynchronously(com.datastax.driver.core.querybuilder.Batch batch) throws DataAccessException
query
- The Batch
to executeResultSetFuture
that can be used to cancel the query.DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.querybuilder.Truncate truncate, AsynchronousQueryListener listener) throws DataAccessException
DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.querybuilder.Delete delete, AsynchronousQueryListener listener) throws DataAccessException
DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.querybuilder.Insert insert, AsynchronousQueryListener listener) throws DataAccessException
DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.querybuilder.Update update, AsynchronousQueryListener listener) throws DataAccessException
DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.querybuilder.Batch batch, AsynchronousQueryListener listener) throws DataAccessException
DataAccessException
com.datastax.driver.core.ResultSetFuture executeAsynchronously(com.datastax.driver.core.Statement query) throws DataAccessException
query
- The Statement
to executeResultSetFuture
that can be used to cancel the query.DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.Statement query, Runnable runnable) throws DataAccessException
query
- The Statement
to executeCancellable
that can be used to cancel the query.DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.Statement query, AsynchronousQueryListener listener) throws DataAccessException
query
- The Statement
to executeCancellable
that can be used to cancel the query.DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.Statement query, Runnable runnable, Executor executor) throws DataAccessException
query
- The Statement
to executeCancellable
that can be used to cancel the query.DataAccessException
Cancellable executeAsynchronously(com.datastax.driver.core.Statement query, AsynchronousQueryListener listener, Executor executor) throws DataAccessException
query
- The Statement
to executeCancellable
that can be used to cancel the query.DataAccessException
<T> T queryAsynchronously(String cql, ResultSetExtractor<T> rse, Long timeout, TimeUnit timeUnit)
cql
- The Queryrse
- The implementation for extracting the ResultSettimeout
- Time to wait for resultstimeUnit
- Time unit to wait for results<T> T queryAsynchronously(String cql, ResultSetExtractor<T> rse, Long timeout, TimeUnit timeUnit, QueryOptions options)
cql
- The Queryrse
- The implementation for extracting the ResultSettimeout
- Time to wait for resultstimeUnit
- Time unit to wait for resultsoptions
- Query Optionscom.datastax.driver.core.ResultSetFuture queryAsynchronously(String cql)
cql
- The Querycom.datastax.driver.core.ResultSetFuture queryAsynchronously(com.datastax.driver.core.querybuilder.Select select)
cql
- The Select
com.datastax.driver.core.ResultSetFuture queryAsynchronously(String cql, QueryOptions options)
cql
- The Queryoptions
- Query OptionsCancellable queryAsynchronously(String cql, Runnable listener)
Runnable
, which is started after the query has completed.
A more useful method than this one is queryAsynchronously(String, AsynchronousQueryListener)
, where you're
given the ResultSetFuture
after the query has been executed.cql
- The Querylistener
- Runnable
listener for handling the query in a separate threadCancellable
that can be used to cancel the query.queryAsynchronously(String, AsynchronousQueryListener)
Cancellable queryAsynchronously(com.datastax.driver.core.querybuilder.Select select, Runnable listener)
Runnable
, which is started after the query has
completed.
A more useful method than this one is queryAsynchronously(Select, AsynchronousQueryListener)
, where you're
given the ResultSetFuture
after the query has been executed.select
- The Select Querylistener
- Runnable
listener for handling the query in a separate threadCancellable
that can be used to cancel the query.queryAsynchronously(Select, AsynchronousQueryListener)
Cancellable queryAsynchronously(String cql, AsynchronousQueryListener listener)
Runnable
. The AsynchronousQueryListener
gives you access to the ResultSetFuture
once the
query is completed for optimal flexibility.cql
- The Querylistener
- AsynchronousQueryListener
for handling the query's ResultSetFuture
in a separate
threadCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(com.datastax.driver.core.querybuilder.Select select, AsynchronousQueryListener listener)
Runnable
. The AsynchronousQueryListener
gives you access to the ResultSetFuture
once the
query is completed for optimal flexibility.select
- The Selectlistener
- AsynchronousQueryListener
for handling the query's ResultSetFuture
in a separate
threadCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(String cql, Runnable listener, QueryOptions options)
cql
- The Queryoptions
- Query Optionlistener
- Runnable Listener for handling the query in a separate threadCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(String cql, AsynchronousQueryListener listener, QueryOptions options)
AsynchronousQueryListener
gives you access to the
ResultSetFuture
once the query is completed for optimal flexibility.cql
- The Queryoptions
- Query Optionlistener
- Runnable Listener for handling the query in a separate threadCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(String cql, Runnable listener, Executor executor)
cql
- The Querylistener
- Runnable Listener for handling the query in a separate threadexecutor
- To execute the Runnable ListenerCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(com.datastax.driver.core.querybuilder.Select select, Runnable listener, Executor executor)
select
- The Select Querylistener
- Runnable Listener for handling the query in a separate threadexecutor
- To execute the Runnable ListenerCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(String cql, AsynchronousQueryListener listener, Executor executor)
AsynchronousQueryListener
gives you access to the ResultSetFuture
once the query is completed for optimal flexibility.cql
- The Queryoptions
- Query Optionlistener
- Runnable Listener for handling the query in a separate threadexecutor
- To execute the Runnable ListenerCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(com.datastax.driver.core.querybuilder.Select select, AsynchronousQueryListener listener, Executor executor)
AsynchronousQueryListener
gives you access to the ResultSetFuture
once the query is completed for optimal flexibility.select
- The Select Querylistener
- Runnable Listener for handling the query in a separate threadexecutor
- To execute the Runnable ListenerCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(String cql, Runnable listener, QueryOptions options, Executor executor)
cql
- The Queryoptions
- Query Optionlistener
- Runnable Listener for handling the query in a separate threadexecutor
- To execute the Runnable ListenerCancellable
that can be used to cancel the query.Cancellable queryAsynchronously(String cql, AsynchronousQueryListener listener, QueryOptions options, Executor executor)
AsynchronousQueryListener
gives you access to the
ResultSetFuture
once the query is completed for optimal flexibility.cql
- listener
- options
- executor
- Cancellable
that can be used to cancel the query.com.datastax.driver.core.ResultSet query(String cql)
ResultSet
.cql
- The queryResultSet
com.datastax.driver.core.ResultSet query(com.datastax.driver.core.querybuilder.Select select)
ResultSet
.select
- The Select QueryResultSet
com.datastax.driver.core.ResultSet query(String cql, QueryOptions options)
QueryOptions
and returns the ResultSet
.cql
- The queryoptions
- The QueryOptions
; may be null.ResultSet
<T> T query(String cql, ResultSetExtractor<T> rse) throws DataAccessException
cql
- The Queryrse
- The implementation for extracting the ResultSetDataAccessException
<T> T query(com.datastax.driver.core.querybuilder.Select select, ResultSetExtractor<T> rse) throws DataAccessException
select
- The SelectQueryrse
- The implementation for extracting the ResultSetDataAccessException
<T> T query(String cql, ResultSetExtractor<T> rse, QueryOptions options) throws DataAccessException
cql
- The Queryrse
- The implementation for extracting the ResultSetoptions
- Query OptionsDataAccessException
void query(String cql, RowCallbackHandler rch) throws DataAccessException
RowCallbackHandler
.cql
- The Queryrch
- The implementation for processing the rows returned.DataAccessException
void query(com.datastax.driver.core.querybuilder.Select select, RowCallbackHandler rch) throws DataAccessException
RowCallbackHandler
.select
- The Select Queryrch
- The implementation for processing the rows returned.DataAccessException
void query(String cql, RowCallbackHandler rch, QueryOptions options) throws DataAccessException
RowCallbackHandler
.cql
- The Queryrch
- The implementation for processing the rows returned.options
- Query Options ObjectDataAccessException
void process(com.datastax.driver.core.ResultSet resultSet, RowCallbackHandler rch) throws DataAccessException
resultSet
- Results to processrch
- RowCallbackHandler with the processing implementationDataAccessException
<T> List<T> query(String cql, RowMapper<T> rowMapper) throws DataAccessException
cql
- The QueryrowMapper
- The implementation for mapping all rowsDataAccessException
<T> List<T> query(com.datastax.driver.core.querybuilder.Select select, RowMapper<T> rowMapper) throws DataAccessException
select
- The Select QueryrowMapper
- The implementation for mapping all rowsDataAccessException
<T> List<T> query(String cql, RowMapper<T> rowMapper, QueryOptions options) throws DataAccessException
cql
- The QueryrowMapper
- The implementation for mapping all rowsoptions
- Query Options ObjectDataAccessException
<T> List<T> process(com.datastax.driver.core.ResultSet resultSet, RowMapper<T> rowMapper) throws DataAccessException
resultSet
- Results to processrowMapper
- RowMapper with the processing implementationDataAccessException
<T> Cancellable queryForObjectAsynchronously(String cql, RowMapper<T> rowMapper, QueryForObjectListener<T> listener) throws DataAccessException
RowMapper
.cql
- The string query CQL.rowMapper
- The RowMapper
to convert the row into an object of type T
.listener
- The listener that receives the results upon completion.Cancellable
that can be used to cancel the query.DataAccessException
<T> Cancellable queryForObjectAsynchronously(String cql, RowMapper<T> rowMapper, QueryForObjectListener<T> listener, QueryOptions options) throws DataAccessException
RowMapper
.cql
- The string query CQL.rowMapper
- The RowMapper
to convert the row into an object of type T
.listener
- The listener that receives the results upon completion.options
- The QueryOptions
to use. May be null
.Cancellable
that can be used to cancel the query.DataAccessException
<T> Cancellable queryForObjectAsynchronously(com.datastax.driver.core.querybuilder.Select select, RowMapper<T> rowMapper, QueryForObjectListener<T> listener) throws DataAccessException
Select
query, and maps the first row returned with the supplied RowMapper
.select
- The Select
query to execute.rowMapper
- The RowMapper
to convert the row into an object of type T
.listener
- The listener that receives the results upon completion.Cancellable
that can be used to cancel the query.DataAccessException
<T> T queryForObject(String cql, RowMapper<T> rowMapper) throws DataAccessException
This expects only ONE row to be returned. More than one Row will cause an Exception to be thrown.
cql
- The QueryrowMapper
- The implementation for convert the Row to DataAccessException
<T> T queryForObject(com.datastax.driver.core.querybuilder.Select select, RowMapper<T> rowMapper) throws DataAccessException
This expects only ONE row to be returned. More than one Row will cause an Exception to be thrown.
select
- The Select QueryrowMapper
- The implementation for convert the Row to DataAccessException
<T> T processOne(com.datastax.driver.core.ResultSet resultSet, RowMapper<T> rowMapper) throws DataAccessException
ResultSet
with RowMapper
. This method is used internally to the template for core
operations, but is made available through this interface in the event you have a ResultSet
to process. The
ResultSet
could come from a ResultSetFuture
after an asynchronous query.resultSet
- ResultSet
to process, must not be null.rowMapper
- RowMapper
used to process the single row of the result set, must not be null.IncorrectResultSizeDataAccessException
- if no rows are found, or more than 1 row is found.DataAccessException
- if a Cassandra driver error occurs.<T> T queryForObject(String cql, Class<T> requiredType) throws DataAccessException
cql
- The QueryrequiredType
- Valid Class that Cassandra Data Types can be converted to.DataAccessException
<T> Cancellable queryForObjectAsynchronously(com.datastax.driver.core.querybuilder.Select select, Class<T> requiredType, QueryForObjectListener<T> listener) throws DataAccessException
Select
query and returns the first column of the first Row as an object of type
T
.select
- The Select
queryrequiredType
- Type that Cassandra data types can be converted to.Cancellable
that can be used to cancel the query if necessary.DataAccessException
<T> Cancellable queryForObjectAsynchronously(String cql, Class<T> requiredType, QueryForObjectListener<T> listener) throws DataAccessException
T
.cql
- The select query CQL. Must not be null
or blank.requiredType
- The type to convert the first column of the first row to. Must not be null
.Cancellable
that can be used to cancel the query if necessary. Must not be null
.DataAccessException
<T> Cancellable queryForObjectAsynchronously(String cql, Class<T> requiredType, QueryForObjectListener<T> listener, QueryOptions options) throws DataAccessException
T
.cql
- The select query CQL. Must not be null
or blank.requiredType
- The type to convert the first column of the first row to. Must not be null
.options
- The QueryOptions
to use. May be null
.Cancellable
that can be used to cancel the query if necessary. Must not be null
.DataAccessException
<T> T queryForObject(com.datastax.driver.core.querybuilder.Select select, Class<T> requiredType) throws DataAccessException
select
- The Select QueryrequiredType
- Valid Class that Cassandra Data Types can be converted to.DataAccessException
<T> T processOne(com.datastax.driver.core.ResultSet resultSet, Class<T> requiredType) throws DataAccessException
resultSet
- requiredType
- DataAccessException
Map<String,Object> queryForMap(String cql) throws DataAccessException
cql
- The QueryDataAccessException
Map<String,Object> queryForMap(com.datastax.driver.core.querybuilder.Select select) throws DataAccessException
select
- The Select QueryDataAccessException
Cancellable queryForMapAsynchronously(String cql, QueryForMapListener listener) throws DataAccessException
Map
<String,Object>.
Additional rows are ignored.cql
- The select query CQL. Must not be null
or blank.listener
- The QueryForMapListener
that will recieve the results upon query completion. Must not be
null
.Cancellable
that can be used to cancel the query if necessary. Must not be null
.DataAccessException
Cancellable queryForMapAsynchronously(String cql, QueryForMapListener listener, QueryOptions options) throws DataAccessException
Map
<String,Object>.
Additional rows are ignored.cql
- The select query CQL. Must not be null
or blank.listener
- The QueryForMapListener
that will recieve the results upon query completion. Must not be
null
.options
- The QueryOptions
to use. May be null
.Cancellable
that can be used to cancel the query if necessary. Must not be null
.DataAccessException
Cancellable queryForMapAsynchronously(com.datastax.driver.core.querybuilder.Select select, QueryForMapListener listener) throws DataAccessException
Select
query asynchronously and maps the first row to a Map
<String,Object>. Additional rows are ignored.cql
- The select query CQL. Must not be null
or blank.listener
- The QueryForMapListener
that will recieve the results upon query completion. Must not be
null
.Cancellable
that can be used to cancel the query if necessary. Must not be null
.DataAccessException
Map<String,Object> processMap(com.datastax.driver.core.ResultSet resultSet) throws DataAccessException
resultSet
- DataAccessException
<T> List<T> queryForList(String cql, Class<T> elementType) throws DataAccessException
cql
- The QueryelementType
- Type to cast the data values toDataAccessException
<T> List<T> queryForList(com.datastax.driver.core.querybuilder.Select select, Class<T> elementType) throws DataAccessException
select
- The Select QueryelementType
- Type to cast the data values toDataAccessException
<T> Cancellable queryForListAsynchronously(com.datastax.driver.core.querybuilder.Select select, Class<T> elementType, QueryForListListener<T> listener) throws DataAccessException
Select
query asynchronously and returns all values in the first column of the results
as a List
of the type in the second argument.select
- The Select
queryelementType
- The type to cast the data values tolistener
- The listener to receive the results asynchronously. Must not be null
.Cancellable
to cancel the query if necessaryDataAccessException
<T> Cancellable queryForListAsynchronously(String select, Class<T> elementType, QueryForListListener<T> listener) throws DataAccessException
Select
query asynchronously and returns all values in the first column of the results
as a List
of the type in the second argument.select
- The select query CQLelementType
- The type to cast the data values tolistener
- The listener to receive the results asynchronously. Must not be null
.Cancellable
to cancel the query if necessaryDataAccessException
<T> List<T> processList(com.datastax.driver.core.ResultSet resultSet, Class<T> elementType) throws DataAccessException
resultSet
- elementType
- DataAccessException
List<Map<String,Object>> queryForListOfMap(String cql) throws DataAccessException
cql
- The QueryDataAccessException
Cancellable queryForListOfMapAsynchronously(com.datastax.driver.core.querybuilder.Select select, QueryForListListener<Map<String,Object>> listener) throws DataAccessException
Select
query and converts the results to a List
of Map
s. Each element
in the List
represents a row returned from the query. Each row's column(s) are put into a Map
as
values keyed by column name.select
- The Select
query. Must not be null
.listener
- The listener that will receive the results upon query completion. Must not be null
.Cancellable
that can be used to cancel the query. Must not be null
.DataAccessException
Cancellable queryForListOfMapAsynchronously(String cql, QueryForListListener<Map<String,Object>> listener) throws DataAccessException
List
of Map
s. Each element in
the List
represents a row returned from the query. Each row's column(s) are put into a Map
as
values keyed by column name.select
- The select query CQL. Must not be null
or blank.listener
- The listener that will receive the results upon query completion. Must not be null
.Cancellable
that can be used to cancel the query. Must not be null
.DataAccessException
Cancellable queryForListOfMapAsynchronously(String cql, QueryForListListener<Map<String,Object>> listener, QueryOptions options) throws DataAccessException
List
of Map
s. Each element in
the List
represents a row returned from the query. Each row's column(s) are put into a Map
as
values keyed by column name.select
- The select query CQL. Must not be null
or blank.listener
- The listener that will receive the results upon query completion. Must not be null
.options
- The QueryOptions
to use. May be null
.Cancellable
that can be used to cancel the query. Must not be null
.DataAccessException
List<Map<String,Object>> queryForListOfMap(com.datastax.driver.core.querybuilder.Select select) throws DataAccessException
select
- The Select QueryDataAccessException
List<Map<String,Object>> processListOfMap(com.datastax.driver.core.ResultSet resultSet) throws DataAccessException
resultSet
- DataAccessException
<T> T execute(String cql, PreparedStatementCallback<T> action) throws DataAccessException
PreparedStatement
from the given CQL, invokes the PreparedStatementCallback
with that PreparedStatement
, then returns the value returned by the PreparedStatementCallback
.cql
- The CQL statement from which to create and cache a PreparedStatement
action
- The callback that is given the PreparedStatement
PreparedStatementCallback
DataAccessException
<T> T execute(PreparedStatementCreator psc, PreparedStatementCallback<T> action) throws DataAccessException
PreparedStatementCreator
to create a PreparedStatement
in the current
Session
, then passes that PreparedStatement
to the given PreparedStatementCallback
.psc
- The PreparedStatementCreator
action
- The callback that receives the PreparedStatement
PreparedStatementCallback
DataAccessException
<T> T query(String cql, PreparedStatementBinder psb, ResultSetExtractor<T> rse) throws DataAccessException
CachedPreparedStatementCreator
. Then, the PreparedStatementBinder will
bind its values to the bind variables in the provided CQL String. The results of the PreparedStatement are
processed with the ResultSetExtractor implementation provided by the Application Code. The can return any object,
including a List of Objects to support the ResultSet processing.cql
- The Query to Preparepsb
- The Binding implementationrse
- The implementation for extracting the results of the query.DataAccessException
<T> T query(String cql, PreparedStatementBinder psb, ResultSetExtractor<T> rse, QueryOptions options) throws DataAccessException
CachedPreparedStatementCreator
. Then, the PreparedStatementBinder will
bind its values to the bind variables in the provided CQL String. The results of the PreparedStatement are
processed with the ResultSetExtractor implementation provided by the Application Code. The can return any object,
including a List of Objects to support the ResultSet processing.cql
- The Query to Preparepsb
- The Binding implementationrse
- The implementation for extracting the results of the query.options
- The Query Options to apply to the PreparedStatementDataAccessException
void query(String cql, PreparedStatementBinder psb, RowCallbackHandler rch) throws DataAccessException
CachedPreparedStatementCreator
. Then, the PreparedStatementBinder will
bind its values to the bind variables in the provided CQL String. The results of the PreparedStatement are
processed with the RowCallbackHandler implementation provided and nothing is returned.cql
- The Query to Preparepsb
- The Binding implementationrch
- The RowCallbackHandler for processing the ResultSetDataAccessException
void query(String cql, PreparedStatementBinder psb, RowCallbackHandler rch, QueryOptions options) throws DataAccessException
CachedPreparedStatementCreator
. Then, the PreparedStatementBinder will
bind its values to the bind variables in the provided CQL String. The results of the PreparedStatement are
processed with the RowCallbackHandler implementation provided and nothing is returned.cql
- The Query to Preparepsb
- The Binding implementationrch
- The RowCallbackHandler for processing the ResultSetoptions
- The Query Options ObjectDataAccessException
<T> List<T> query(String cql, PreparedStatementBinder psb, RowMapper<T> rowMapper) throws DataAccessException
CachedPreparedStatementCreator
. Then, the PreparedStatementBinder will
bind its values to the bind variables in the provided CQL String. The results of the PreparedStatement are
processed with the RowMapper implementation provided and a List is returned with elements of Type cql
- The Query to Preparepsb
- The Binding implementationrowMapper
- The implementation for Mapping a Row to Type DataAccessException
<T> List<T> query(String cql, PreparedStatementBinder psb, RowMapper<T> rowMapper, QueryOptions options) throws DataAccessException
CachedPreparedStatementCreator
. Then, the PreparedStatementBinder will
bind its values to the bind variables in the provided CQL String. The results of the PreparedStatement are
processed with the RowMapper implementation provided and a List is returned with elements of Type cql
- The Query to Preparepsb
- The Binding implementationrowMapper
- The implementation for Mapping a Row to Type options
- The Query Options ObjectDataAccessException
<T> T query(PreparedStatementCreator psc, ResultSetExtractor<T> rse) throws DataAccessException
psc
- The implementation to create the PreparedStatementrse
- Implementation for extracting from the ResultSetDataAccessException
<T> T query(PreparedStatementCreator psc, ResultSetExtractor<T> rse, QueryOptions options) throws DataAccessException
psc
- The implementation to create the PreparedStatementrse
- Implementation for extracting from the ResultSetoptions
- The Query Options ObjectDataAccessException
void query(PreparedStatementCreator psc, RowCallbackHandler rch) throws DataAccessException
psc
- The implementation to create the PreparedStatementrch
- The implementation to process ResultsDataAccessException
void query(PreparedStatementCreator psc, RowCallbackHandler rch, QueryOptions options) throws DataAccessException
psc
- The implementation to create the PreparedStatementrch
- The implementation to process Resultsoptions
- The Query Options ObjectDataAccessException
<T> List<T> query(PreparedStatementCreator psc, RowMapper<T> rowMapper) throws DataAccessException
psc
- The implementation to create the PreparedStatementrowMapper
- The implementation for mapping each Row returned.DataAccessException
<T> List<T> query(PreparedStatementCreator psc, RowMapper<T> rowMapper, QueryOptions options) throws DataAccessException
psc
- The implementation to create the PreparedStatementrowMapper
- The implementation for mapping each Row returned.options
- The Query Options ObjectDataAccessException
<T> T query(PreparedStatementCreator psc, PreparedStatementBinder psb, ResultSetExtractor<T> rse, QueryOptions options) throws DataAccessException
psc
- The implementation to create the PreparedStatementpsb
- The implementation to bind variables to valuesrse
- Implementation for extracting from the ResultSetoptions
- The Query Options ObjectDataAccessException
<T> T query(PreparedStatementCreator psc, PreparedStatementBinder psb, ResultSetExtractor<T> rse) throws DataAccessException
psc
- The implementation to create the PreparedStatementpsb
- The implementation to bind variables to valuesrse
- Implementation for extracting from the ResultSetDataAccessException
void query(PreparedStatementCreator psc, PreparedStatementBinder psb, RowCallbackHandler rch, QueryOptions options) throws DataAccessException
psc
- The implementation to create the PreparedStatementpsb
- The implementation to bind variables to valuesrch
- The implementation to process Resultsoptions
- The Query Options ObjectDataAccessException
void query(PreparedStatementCreator psc, PreparedStatementBinder psb, RowCallbackHandler rch) throws DataAccessException
psc
- The implementation to create the PreparedStatementpsb
- The implementation to bind variables to valuesrch
- The implementation to process ResultsDataAccessException
<T> List<T> query(PreparedStatementCreator psc, PreparedStatementBinder psb, RowMapper<T> rowMapper, QueryOptions options) throws DataAccessException
psc
- The implementation to create the PreparedStatementpsb
- The implementation to bind variables to valuesrowMapper
- The implementation for mapping each Row returned.options
- The Query Options ObjectDataAccessException
<T> List<T> query(PreparedStatementCreator psc, PreparedStatementBinder psb, RowMapper<T> rowMapper) throws DataAccessException
psc
- The implementation to create the PreparedStatementpsb
- The implementation to bind variables to valuesrowMapper
- The implementation for mapping each Row returned.DataAccessException
List<RingMember> describeRing() throws DataAccessException
RingMemberHostMapper
to provide the basics of the
Cassandra Ring topology.DataAccessException
<T> Collection<T> describeRing(HostMapper<T> hostMapper) throws DataAccessException
HostMapper
implementation to process the
lists of hosts returned by the Cassandra Cluster Metadata.hostMapper
- The implementation to use for host mapping.DataAccessException
com.datastax.driver.core.Session getSession()
void ingest(String cql, RowIterator rowIterator, WriteOptions options)
This is used internally by the other ingest() methods, but can be used if you want to write your own RowIterator. The Object[] length returned by the next() implementation must match the number of bind variables in the CQL.
cql
- The CQLrowIterator
- Implementation to provide the Object[] to be bound to the CQL.options
- The Query Options Objectvoid ingest(String cql, RowIterator rowIterator)
This is used internally by the other ingest() methods, but can be used if you want to write your own RowIterator. The Object[] length returned by the next() implementation must match the number of bind variables in the CQL.
cql
- The CQLrowIterator
- Implementation to provide the Object[] to be bound to the CQL.void ingest(String cql, List<List<?>> rows, WriteOptions options)
The List> length must match the number of bind variables in the CQL.
cql
- The CQLrows
- List of List> with data to bind to the CQL.options
- The Query Options Objectvoid ingest(String cql, List<List<?>> rows)
PreparedStatement
once, then all row values are bound to that PreparedStatement
and executed against the Session
.
The lengths of the nested List
s must not be less than the number of bind variables in the CQL.
cql
- The CQLrows
- The data to bind to the CQL statementvoid ingest(String cql, Object[][] rows)
PreparedStatement
once, then all row values are bound to that PreparedStatement
and executed against the Session
.
The lengths of the nested object arrays must not be less than the number of bind variables in the CQL.
cql
- The CQLrows
- The data to bind to the CQL statementvoid ingest(String cql, Object[][] rows, WriteOptions options)
PreparedStatement
once, then all row values are bound to that PreparedStatement
and executed against the Session
.
The lengths of the nested object arrays must not be less than the number of bind variables in the CQL.
cql
- The CQLrows
- The data to bind to the CQL statementoptions
- The Query Options Objectvoid truncate(CqlIdentifier tableName)
tableName
- void truncate(String tableName)
tableName
- long count(CqlIdentifier tableName)
tableName
- long count(String tableName)
tableName
- com.datastax.driver.core.ResultSet execute(DropTableSpecification specification)
specification
- The specification to execute; must not be null.com.datastax.driver.core.ResultSet execute(CreateTableSpecification specification)
specification
- The specification to execute; must not be null.com.datastax.driver.core.ResultSet execute(AlterTableSpecification specification)
specification
- The specification to execute; must not be null.com.datastax.driver.core.ResultSet execute(DropKeyspaceSpecification specification)
specification
- The specification to execute; must not be null.com.datastax.driver.core.ResultSet execute(CreateKeyspaceSpecification specification)
specification
- The specification to execute; must not be null.com.datastax.driver.core.ResultSet execute(AlterKeyspaceSpecification specification)
specification
- The specification to execute; must not be null.com.datastax.driver.core.ResultSet execute(DropIndexSpecification specification)
specification
- The specification to execute; must not be null.com.datastax.driver.core.ResultSet execute(CreateIndexSpecification specification)
specification
- The specification to execute; must not be null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.