class Result
Represents the result of an execution as an iterable of objects in the Mapper.
Members
Number
length
Gets the amount of the documents contained in this Result instance.
When the results are paged, it returns the length of the current paged results not the total amount of rows in the table matching the query.
String
pageState
A string token representing the current page state of query.
When provided, it can be used in the following executions to continue paging and retrieve the remained of the result for the query.
Constructor
Creates a new instance of Result.
Methods
Symbol.iterator
()Returns a new Iterator object that contains the document values.
first
()Gets the first document in this result or null when the result is empty.
Executes a provided function once per result element.
toArray
()Converts the current instance to an Array of documents.
wasApplied
()When this instance is the result of a conditional update query, it returns whether it was successful.
Otherwise, it returns true
.
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 the server doesn’t return
information whether it was applied or not.