new QueryResult(_queryResult)
Internal constructor. Use `Connection.query` or `Connection.execute`
to get a `QueryResult` object.
Parameters:
Name | Type | Description |
---|---|---|
_queryResult |
kuzu.sync.QueryResult | the native query result object. |
- Source:
Methods
close()
Close the query result.
- Source:
getAllObjects() → {Array.<Object>}
Get all objects of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
all objects of the query result.
- Type
- Array.<Object>
getAllRows() → {Array.<Array>}
Get all rows of the query result.
- Source:
Throws:
-
if the query result
- Type
- Error
Returns:
all rows of the query result.
- Type
- Array.<Array>
getColumnNames() → {Array.<String>}
Get the column names of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the column names of the query result.
- Type
- Array.<String>
getColumnTypes() → {Array.<String>}
Get the column types of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the column types of the query result.
- Type
- Array.<String>
getErrorMessage() → {String}
Get the error message if the query result is not successfully executed.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the error message.
- Type
- String
getNext() → {Array}
Get the next row of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the next row of the query result.
- Type
- Array
getNextQueryResult() → {QueryResult}
Get the following query result when multiple statements are executed within
a single query.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the next query result.
- Type
- QueryResult
getNumColumns() → {Number}
Get the number of columns of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the number of columns of the query result.
- Type
- Number
getNumTuples() → {Number}
Get the number of rows of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the number of rows of the query result.
- Type
- Number
getQuerySummary() → {Object}
Get the query summary (execution time and compiling time) of the query
result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the query summary of the query result.
- Type
- Object
hasNext() → {Number}
Get the number of rows of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the number of rows of the query result.
- Type
- Number
hasNextQueryResult() → {Boolean}
Check if the query result has a following query result when multiple
statements are executed within a single query.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
true if the query result has a following query result.
- Type
- Boolean
isSuccess() → {Boolean}
Check if the query result is successfully executed.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
true if the query result is successfully executed.
- Type
- Boolean
resetIterator()
Reset the iterator of the query result to the beginning.
This function is useful if the query result is iterated multiple times.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
toString() → {String}
Get the string representation of the query result.
- Source:
Throws:
-
if the query result is closed.
- Type
- Error
Returns:
the string representation of the query result.
- Type
- String