public interface ResultSet extends PagingIterable<ResultSet,Row>
QueryOptions.setFetchSize(int)or per-statement with
Statement.setFetchSize(int). Though new pages are automatically (and transparently) fetched when needed, it is possible to force the retrieval of the next page early through
PagingIterable.fetchMoreResults(). Please note however that this ResultSet paging is not available with the version 1 of the native protocol (i.e. with Cassandra 1.2 or if version 1 has been explicitly requested through
Cluster.Builder.withProtocolVersion(com.datastax.driver.core.ProtocolVersion)). If the protocol version 1 is in use, a ResultSet is always fetched in it's entirely and it's up to the client to make sure that no query can yield ResultSet that won't hold in memory. Note that this class is not thread-safe.
|Modifier and Type||Method and Description|
Returns the columns returned in this ResultSet.
Returns the next result from this result set.
If the query that produced this ResultSet was a conditional update, return whether it was successfully applied.
all, fetchMoreResults, getAllExecutionInfo, getAvailableWithoutFetching, getExecutionInfo, isExhausted, isFullyFetched, iterator
rs.one().getBool("[applied]");For consistency, this method always returns
truefor non-conditional queries (although there is no reason to call the method in that case). This is also the case for conditional DDL statements (
CREATE KEYSPACE... IF NOT EXISTS,
CREATE TABLE... IF NOT EXISTS), for which Cassandra doesn't return an
[applied]column. Note that, for versions of Cassandra strictly lower than 2.0.9 and 2.1.0-rc2, a server-side bug (CASSANDRA-7337) causes this method to always return
truefor batches containing conditional queries.
truefor other types of queries.
Copyright © 2012–2018. All rights reserved.