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; }
111 processor::FactorizedTable*
getTable() {
return factorizedTable.get(); }
136 void initResultTableAndIterator(std::shared_ptr<processor::FactorizedTable> factorizedTable_,
137 const std::vector<std::shared_ptr<binder::Expression>>& columns);
138 void validateQuerySucceed()
const;
146 std::vector<std::string> columnNames;
147 std::vector<common::LogicalType> columnDataTypes;
149 std::shared_ptr<processor::FactorizedTable> factorizedTable;
150 std::unique_ptr<processor::FlatTupleIterator> iterator;
151 std::shared_ptr<processor::FlatTuple> tuple;
154 std::unique_ptr<QuerySummary> querySummary;
157 QueryResultIterator queryResultIterator;
#define KUZU_API
Definition api.h:25
Contain client side configuration. We make profiler associated per query, so profiler is not maintain...
Definition client_context.h:51
Connection is used to interact with a Database instance. Each Connection is thread-safe....
Definition connection.h:14
QueryResult stores the result of a query execution.
Definition query_result.h:18
KUZU_API QueryResult * getNextQueryResult()
std::unique_ptr< QueryResult > nextQueryResult
Definition query_result.h:96
KUZU_API bool isSuccess() const
KUZU_API size_t getNumColumns() const
KUZU_API std::vector< std::string > getColumnNames() const
KUZU_API std::string toString()
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.
processor::FactorizedTable * getTable()
Definition query_result.h:111
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 alter_type.h:5
PreparedSummary stores the compiling time and query options of a query.
Definition query_summary.h:12