1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/verification/prepared_statement_verifier.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/verification/statement_verifier.hpp" |
12 | |
13 | namespace duckdb { |
14 | |
15 | class PreparedStatementVerifier : public StatementVerifier { |
16 | public: |
17 | explicit PreparedStatementVerifier(unique_ptr<SQLStatement> statement_p); |
18 | static unique_ptr<StatementVerifier> Create(const SQLStatement &statement_p); |
19 | |
20 | bool Run(ClientContext &context, const string &query, |
21 | const std::function<unique_ptr<QueryResult>(const string &, unique_ptr<SQLStatement>)> &run) override; |
22 | |
23 | private: |
24 | vector<unique_ptr<ParsedExpression>> values; |
25 | unique_ptr<SQLStatement> prepare_statement; |
26 | unique_ptr<SQLStatement> execute_statement; |
27 | unique_ptr<SQLStatement> dealloc_statement; |
28 | |
29 | private: |
30 | void Extract(); |
31 | void ConvertConstants(unique_ptr<ParsedExpression> &child); |
32 | }; |
33 | |
34 | } // namespace duckdb |
35 |