public interface ResultSet extends PagingIterable<Row>
See PagingIterable
for a few generic explanations about the behavior of this object;
in particular, implementations are not thread-safe. They can only be iterated by the
thread that invoked session.execute
.
Modifier and Type | Method and Description |
---|---|
boolean |
wasApplied()
If the query that produced this result was a CQL conditional update, indicate whether it was
successfully applied.
|
all, getAvailableWithoutFetching, getColumnDefinitions, getExecutionInfo, getExecutionInfos, isFullyFetched, map, one, spliterator
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.1.0-rc2, a server-side bug (CASSANDRA-7337) causes this
method to always return true
for batches containing conditional queries.
This is equivalent to calling:
this.iterator().next().getBoolean("[applied]")Except that this method peeks at the next row without consuming it.
wasApplied
in interface PagingIterable<Row>
Copyright © 2017–2021. All rights reserved.