Was this page helpful?
Caution
You're viewing documentation for an unstable version of ScyllaDB Node.js Driver. Switch to the latest stable version.
ResultSet¶
ResultSet()
Represents the result of a query.
Constructor¶
new ResultSet()
Members¶
(readonly) columns
Gets the columns returned in this ResultSet.
(readonly) info
Information on the execution of a successful query.
nextPage
Method used to manually fetch the next page of results. This method is only exposed when using the Client#eachRow method and there are more rows available in following pages.
pageState
A string token representing the current page state of query. It can be used in the following executions to continue paging and retrieve the remained of the result for the query.
- Default Value:
- null
rowLength
Gets the row length of the result, regardless if the result has been buffered or not
rows
Gets an array rows returned by the query.
When the result set represents a response from a write query, this property will be undefined.
When the read query result contains more rows than the fetch size (5000), this property will only contain the
first rows up to fetch size. To obtain all the rows, you can use the built-in async iterator that will retrieve the
following pages of results.
Methods¶
first()
Returns the first row or null if the result rows are empty.
isPaged()
Determines whether there are more pages of results.
If so, the driver will initially retrieve and contain only the first page of results.
To obtain all the rows, use the AsyncIterator.
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.