QueryResult stores the result of a query execution.
More...
#include <query_result.h>
QueryResult stores the result of a query execution.
◆ QueryResult() [1/2]
KUZU_API kuzu::main::QueryResult::QueryResult |
( |
| ) |
|
Used to create a QueryResult object for the failing query.
◆ QueryResult() [2/2]
kuzu::main::QueryResult::QueryResult |
( |
const PreparedSummary & | preparedSummary | ) |
|
|
explicit |
◆ ~QueryResult()
KUZU_API kuzu::main::QueryResult::~QueryResult |
( |
| ) |
|
◆ getArrowSchema()
Returns the arrow schema of the query result.
- Returns
- datatypes of the columns as an arrow schema
It is the caller's responsibility to call the release function to release the underlying data If converting to another arrow type, this this is usually handled automatically.
◆ getColumnDataTypes()
- Returns
- dataType of each column in query result.
◆ getColumnNames()
KUZU_API std::vector< std::string > kuzu::main::QueryResult::getColumnNames |
( |
| ) |
const |
- Returns
- name of each column in query result.
◆ getErrorMessage()
KUZU_API std::string kuzu::main::QueryResult::getErrorMessage |
( |
| ) |
const |
- Returns
- error message of the query execution if the query fails.
◆ getNext()
- Returns
- next flat tuple in the query result.
◆ getNextArrowChunk()
KUZU_API std::unique_ptr< ArrowArray > kuzu::main::QueryResult::getNextArrowChunk |
( |
int64_t | chunkSize | ) |
|
Returns the next chunk of the query result as an arrow array.
- Parameters
-
chunkSize | number of tuples to return in the chunk. |
- Returns
- An arrow array representation of the next chunkSize tuples of the query result.
The ArrowArray internally stores an arrow struct with fields for each of the columns. This can be converted to a RecordBatch with arrow's ImportRecordBatch function
It is the caller's responsibility to call the release function to release the underlying data If converting to another arrow type, this this is usually handled automatically.
◆ getNextQueryResult()
- Returns
- get next query result to read (for multiple query statements).
◆ getNumColumns()
KUZU_API size_t kuzu::main::QueryResult::getNumColumns |
( |
| ) |
const |
- Returns
- number of columns in query result.
◆ getNumTuples()
KUZU_API uint64_t kuzu::main::QueryResult::getNumTuples |
( |
| ) |
const |
- Returns
- num of tuples in query result.
◆ getQuerySummary()
- Returns
- query summary which stores the execution time, compiling time, plan and query options.
◆ getTable()
processor::FactorizedTable * kuzu::main::QueryResult::getTable |
( |
| ) |
|
|
inline |
◆ hasNext()
KUZU_API bool kuzu::main::QueryResult::hasNext |
( |
| ) |
const |
- Returns
- whether there are more tuples to read.
◆ hasNextQueryResult()
KUZU_API bool kuzu::main::QueryResult::hasNextQueryResult |
( |
| ) |
const |
- Returns
- whether there are more query results to read.
◆ isSuccess()
KUZU_API bool kuzu::main::QueryResult::isSuccess |
( |
| ) |
const |
- Returns
- query is executed successfully or not.
◆ resetIterator()
KUZU_API void kuzu::main::QueryResult::resetIterator |
( |
| ) |
|
Resets the result tuple iterator.
◆ toString()
KUZU_API std::string kuzu::main::QueryResult::toString |
( |
| ) |
|
- Returns
- string of first query result.
◆ ClientContext
◆ Connection
◆ nextQueryResult
std::unique_ptr<QueryResult> kuzu::main::QueryResult::nextQueryResult |
The documentation for this class was generated from the following file: