Kuzu 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
7#include "api.h"
8#include "kuzu_fwd.h"
9#include "statement.h"
10#include "query_summary.h"
11
12namespace kuzu {
13namespace main {
14
20 friend class Connection;
21 friend class ClientContext;
22 friend class testing::TestHelper;
23 friend class testing::TestRunner;
24
25public:
30 KUZU_API bool isSuccess() const;
34 KUZU_API std::string getErrorMessage() const;
38 KUZU_API bool isReadOnly() const;
39
40 std::unordered_map<std::string, std::shared_ptr<common::Value>> getParameterMap() {
41 return parameterMap;
42 }
43
45
47
48private:
49 bool isProfile() const;
50
51private:
52 bool success = true;
53 bool readOnly = false;
54 bool useInternalCatalogEntry = false;
55 std::string errMsg;
56 PreparedSummary preparedSummary;
57 std::unordered_map<std::string, std::shared_ptr<common::Value>> parameterMap;
58 std::unique_ptr<binder::BoundStatementResult> statementResult;
59 std::unique_ptr<planner::LogicalPlan> logicalPlan;
60 std::shared_ptr<parser::Statement> parsedStatement;
61};
62
63} // namespace main
64} // namespace kuzu
#define KUZU_API
Definition api.h:25
A prepared statement is a parameterized query which can avoid planning the same query for repeated ex...
Definition prepared_statement.h:19
KUZU_API bool isReadOnly() const
friend class testing::TestRunner
Definition prepared_statement.h:23
friend class Connection
Definition prepared_statement.h:20
std::unordered_map< std::string, std::shared_ptr< common::Value > > getParameterMap()
Definition prepared_statement.h:40
friend class testing::TestHelper
Definition prepared_statement.h:22
KUZU_API bool isSuccess() const
KUZU_API std::string getErrorMessage() const
common::StatementType getStatementType() const
friend class ClientContext
Definition prepared_statement.h:21
StatementType
Definition statement_type.h:8
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