21 class QueryResultIterator {
26 QueryResultIterator() =
default;
28 explicit QueryResultIterator(
QueryResult* startResult) : currentResult(startResult) {}
36 bool isEnd()
const {
return currentResult ==
nullptr; }
38 bool hasNextQueryResult()
const {
return currentResult->
nextQueryResult !=
nullptr; }
40 QueryResult* getCurrentResult()
const {
return currentResult; }
114 processor::FactorizedTable*
getTable() {
return factorizedTable.get(); }
139 void setColumnHeader(std::vector<std::string> columnNames,
140 std::vector<common::LogicalType> columnTypes);
141 void initResultTableAndIterator(std::shared_ptr<processor::FactorizedTable> factorizedTable_);
142 void validateQuerySucceed()
const;
143 std::pair<std::unique_ptr<processor::FlatTuple>, std::unique_ptr<processor::FlatTupleIterator>>
152 std::vector<std::string> columnNames;
153 std::vector<common::LogicalType> columnDataTypes;
155 std::shared_ptr<processor::FactorizedTable> factorizedTable;
156 std::unique_ptr<processor::FlatTupleIterator> iterator;
157 std::shared_ptr<processor::FlatTuple> tuple;
160 std::unique_ptr<QuerySummary> querySummary;
163 QueryResultIterator queryResultIterator;
#define KUZU_API
Definition api.h:25
KUZU_API QueryResult * getNextQueryResult()
std::unique_ptr< QueryResult > nextQueryResult
Definition query_result.h:96
KUZU_API std::string toString() const
KUZU_API bool isSuccess() const
KUZU_API size_t getNumColumns() const
KUZU_API std::vector< std::string > getColumnNames() const
friend class Connection
Definition query_result.h:19
KUZU_API QuerySummary * getQuerySummary() const
KUZU_API std::string getErrorMessage() const
KUZU_API std::unique_ptr< ArrowArray > getNextArrowChunk(int64_t chunkSize)
Returns the next chunk of the query result as an arrow array.
KUZU_API std::vector< common::LogicalType > getColumnDataTypes() const
QueryResult(const PreparedSummary &preparedSummary)
KUZU_API uint64_t getNumTuples() const
KUZU_API bool hasNextQueryResult() const
KUZU_API QueryResult()
Used to create a QueryResult object for the failing query.
KUZU_API std::shared_ptr< processor::FlatTuple > getNext()
KUZU_API ~QueryResult()
Deconstructs the QueryResult object.
KUZU_API std::unique_ptr< ArrowSchema > getArrowSchema() const
Returns the arrow schema of the query result.
KUZU_API void resetIterator()
Resets the result tuple iterator.
friend class ClientContext
Definition query_result.h:20
processor::FactorizedTable * getTable()
Definition query_result.h:114
KUZU_API bool hasNext() const
QuerySummary stores the execution time, plan, compiling time and query options of a query.
Definition query_summary.h:20
Definition bind_input.h:16
Definition array_utils.h:7
PreparedSummary stores the compiling time and query options of a query.
Definition query_summary.h:12