Kùzu C++ API
Loading...
Searching...
No Matches
prepared_statement.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5#include <unordered_map>
6#include <vector>
7
8#include "api.h"
9#include "kuzu_fwd.h"
10#include "statement.h"
11#include "query_summary.h"
12
13namespace kuzu {
14namespace main {
15
21 friend class Connection;
22 friend class ClientContext;
23 friend class testing::TestHelper;
24 friend class testing::TestRunner;
27
28public:
33 KUZU_API bool isSuccess() const;
37 KUZU_API std::string getErrorMessage() const;
41 KUZU_API bool isReadOnly() const;
42
43 inline std::unordered_map<std::string, std::shared_ptr<common::Value>> getParameterMap() {
44 return parameterMap;
45 }
46
48
50
51private:
52 bool isProfile();
53
54private:
55 bool success = true;
56 bool readOnly = false;
57 std::string errMsg;
58 PreparedSummary preparedSummary;
59 std::unordered_map<std::string, std::shared_ptr<common::Value>> parameterMap;
60 std::unique_ptr<binder::BoundStatementResult> statementResult;
61 std::vector<std::unique_ptr<planner::LogicalPlan>> logicalPlans;
62 std::shared_ptr<parser::Statement> parsedStatement;
63};
64
65} // namespace main
66} // namespace kuzu
#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
A prepared statement is a parameterized query which can avoid planning the same query for repeated ex...
Definition prepared_statement.h:20
KUZU_API bool isReadOnly() const
friend class testing::TestRunner
Definition prepared_statement.h:24
std::unordered_map< std::string, std::shared_ptr< common::Value > > getParameterMap()
Definition prepared_statement.h:43
friend class testing::TestHelper
Definition prepared_statement.h:23
common::StatementType getStatementType()
KUZU_API bool isSuccess() const
friend class testing::TinySnbCopyCSVTransactionTest
Definition prepared_statement.h:26
friend class testing::TinySnbDDLTest
Definition prepared_statement.h:25
KUZU_API std::string getErrorMessage() const
StatementType
Definition statement_type.h:8
Definition alter_type.h:5
PreparedSummary stores the compiling time and query options of a query.
Definition query_summary.h:12