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) → {Promise.<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
- Promise.<Array.<object>>
(async) parseEdge(cell) → {Promise.<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
- Promise.<Edge>
(async) parseEntityProperties(props) → {Promise.<object>}
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
- Promise.<object>
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) parseMap(rawMap) → {Promise.<object>}
Parse a raw map representation into Map object.
Parameters:
Name | Type | Description |
---|---|---|
rawMap |
Array.<object> | raw map representation |
- Source:
Returns:
Map object.
- Type
- Promise.<object>
(async) parseNode(cell) → {Promise.<Node>}
Parse raw node representation into a Node object.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array.<object> | raw node representation. |
- Source:
Returns:
Node object.
- Type
- Promise.<Node>
(async) parsePath(rawPath) → {Promise.<Path>}
Parse a raw path representation into Path object.
Parameters:
Name | Type | Description |
---|---|---|
rawPath |
Array.<object> | raw path representation |
- Source:
Returns:
Path object.
- Type
- Promise.<Path>
parsePoint(rawPoint) → {Object}
Parse a raw Point representation into a lat-lon Map object.
Parameters:
Name | Type | Description |
---|---|---|
rawPoint |
Array.<object> | 2-valued lat-lon array representation |
- Source:
Returns:
Map object with latitude and longitude keys.
- Type
- Object
(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) → {Promise.<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
- Promise.<object>
size() → {number}
- Source:
Returns:
Result set size. (integer)
- Type
- number