Constructor
new ResultSet(graph)
Builds an empty ResultSet object.
Parameters:
Name | Type | Description |
---|---|---|
graph |
Graph |
- Source:
Methods
getHeader() → {Array.<string>}
- Source:
Returns:
ResultSet's header.
- Type
- Array.<string>
getStatistics() → {Statistics}
- Source:
Returns:
ResultsSet's statistics.
- Type
- Statistics
hasNext() → {boolean}
- Source:
Returns:
If the ResultSet object can return additional records.
- Type
- boolean
next() → {Record}
- Source:
Returns:
The current record.
- Type
- Record
(async) parseArray(rawArray) → {Array.<object>}
Parse and in-place replace raw array into an array of values or objects.
Parameters:
Name | Type | Description |
---|---|---|
rawArray |
Array.<object> | raw array representation |
- Source:
Returns:
Parsed array.
- Type
- Array.<object>
(async) parseEdge(cell) → {Edge}
Parse a raw edge representation into an Edge object.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array.<object> | raw edge representation |
- Source:
Returns:
Edge object.
- Type
- Edge
(async) parseEntityProperties(props) → {Map}
Parse raw entity properties representation into a Map
Parameters:
Name | Type | Description |
---|---|---|
props |
Array.<object> | raw properties representation |
- Source:
Returns:
Map with the parsed properties.
- Type
- Map
parseHeader(rawHeader)
A raw representation of a header (query response schema) is a list.
Each entry in the list is a tuple (list of size 2).
tuple[0] represents the type of the column, and tuple[1] represents the name of the column.
Parameters:
Name | Type | Description |
---|---|---|
rawHeader |
Array.<object> | raw header |
- Source:
(async) parseNode(cell) → {Node}
Parse raw node representation into a Node object.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array.<object> | raw node representation. |
- Source:
Returns:
Node object.
- Type
- Node
(async) parsePath(rawPath) → {Path}
Parse a raw path representation into Path object.
Parameters:
Name | Type | Description |
---|---|---|
rawPath |
Array.<object> | raw path representation |
- Source:
Returns:
Path object.
- Type
- Path
(async) parseRecords(rawResultSet)
The raw representation of response is at most 3 lists of objects. rawResultSet[1] contains the data records.
Each entry in the record can be either a node, an edge or a scalar
Parameters:
Name | Type | Description |
---|---|---|
rawResultSet |
Array.<object> | raw result set representation |
- Source:
(async) parseResponse(resp)
Parse raw response data to ResultSet object.
Parameters:
Name | Type | Description |
---|---|---|
resp |
Array.<object> | raw response representation - the raw representation of response is at most 3 lists of objects. The last list is the statistics list. |
- Source:
(async) parseResults(resp)
Parse a raw response body into header an records.
Parameters:
Name | Type | Description |
---|---|---|
resp |
Array.<object> | raw response |
- Source:
(async) parseScalar(cell) → {object}
Parse a raw value into its actual value.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array.<object> | raw value representation |
- Source:
Returns:
Actual value - scalar, array, Node, Edge, Path
- Type
- object
size() → {int}
- Source:
Returns:
Result set size.
- Type
- int