public interface AsyncResultSet extends AsyncPagingIterable<Row,AsyncResultSet>
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.
|
currentPage, fetchNextPage, getColumnDefinitions, getExecutionInfo, hasMorePages, map, one, remaining
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 AsyncPagingIterable<Row,AsyncResultSet>
Copyright © 2017–2024. All rights reserved.