Constructor
new GraphResultSet(result, rowParseropt)
Creates a new instance of
GraphResultSet
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
result |
ResultSet | ||
rowParser |
function |
<optional> |
Examples
for (let vertex of result} { ... }
const arr = result.toArray();
const vertex = result.first();
Members
info :Object
Information on the execution of a successful query:
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
achievedConsistency |
Number | The consistency level that has been actually achieved by the query. |
queriedHost |
String | The Cassandra host that coordinated this query. |
triedHosts |
Object | Gets the associative array of host that were queried before getting a valid response, being the last host the one that replied correctly. |
traceId |
Uuid | Identifier of the trace session. |
warnings |
Array.<string> | Warning messages generated by the server when executing the query. |
pageState :String
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.
Type:
- String
(inner) length :Number
Gets the length of the result.
Type:
- Number
Methods
first() → {Object}
Returns the first element of the result or null if the result is empty.
Returns:
- Type
- Object
forEach(callback, thisArgopt)
Executes a provided function once per result element.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function | Function to execute for each element, taking two arguments: currentValue and index. | |
thisArg |
Object |
<optional> |
Value to use as this when executing callback. |
toArray() → {Array}
Results an Array of graph result elements (vertex, edge, scalar).
Returns:
- Type
- Array
values() → {Object}
Returns a new Iterator object that contains the values for each index in the result.
Returns:
- Type
- Object