public interface ReactiveResultSet
The retrieval of the rows of a ReactiveResultSet
is generally paged (a first page of result is fetched and
the next one is only fetched once all the results of the first one has been consumed). The size of the pages can be
configured either globally through QueryOptions.setFetchSize(int)
or per-statement with
Statement.setFetchSize(int)
.
Please note however that this ReactiveResultSet
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
ReactiveResultSet
is always fetched in it's entirely and it's up to the client to make sure that no query can
yield ReactiveResultSet
that won't hold in memory.
Note that this class is not thread-safe.
Flux
,
ReactiveSession
,
ResultSet
Modifier and Type | Method and Description |
---|---|
List<com.datastax.driver.core.ExecutionInfo> |
getAllExecutionInfo()
Return the execution information for all queries made to retrieve this result set.
|
com.datastax.driver.core.ColumnDefinitions |
getColumnDefinitions()
Returns the columns returned in this ResultSet.
|
com.datastax.driver.core.ExecutionInfo |
getExecutionInfo()
Returns information on the execution of the last query made for this result set.
|
reactor.core.publisher.Flux<com.datastax.driver.core.Row> |
rows()
Returns a
Flux over the rows contained in this result set. |
boolean |
wasApplied()
If the query that produced this ResultSet was a conditional update, return whether it was successfully applied.
|
reactor.core.publisher.Flux<com.datastax.driver.core.Row> rows()
Flux
over the rows contained in this result set.
The Flux
will stream over all records that in this ReactiveResultSet
according to the reactive
demand.
Flux
of rows that will stream over all rows
in this ReactiveResultSet
.com.datastax.driver.core.ColumnDefinitions getColumnDefinitions()
boolean wasApplied()
For consistency, this method always returns true
for 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 true
for batches containing conditional queries.
true
for other types of queries.com.datastax.driver.core.ExecutionInfo getExecutionInfo()
Note that in most cases, a result set is fetched with only one query, but large result sets can be paged and thus
be retrieved by multiple queries. In that case this method return the ExecutionInfo
for the last query
performed. To retrieve the information for all queries, use getAllExecutionInfo()
.
The returned object includes basic information such as the queried hosts, but also the Cassandra query trace if tracing was enabled for the query.
List<com.datastax.driver.core.ExecutionInfo> getAllExecutionInfo()
Unless the result set is large enough to get paged underneath, the returned list will be singleton. If paging has
been used however, the returned list contains the ExecutionInfo
objects for all the queries done to obtain
this result set (at the time of the call) in the order those queries were made.
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.