1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/parser/parsed_data/pragma_info.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/parser/parsed_data/parse_info.hpp" |
12 | #include "duckdb/common/types/value.hpp" |
13 | #include "duckdb/common/named_parameter_map.hpp" |
14 | #include "duckdb/parser/parsed_expression.hpp" |
15 | |
16 | namespace duckdb { |
17 | |
18 | enum class PragmaType : uint8_t { PRAGMA_STATEMENT, PRAGMA_CALL }; |
19 | |
20 | struct PragmaInfo : public ParseInfo { |
21 | //! Name of the PRAGMA statement |
22 | string name; |
23 | //! Parameter list (if any) |
24 | vector<Value> parameters; |
25 | //! Named parameter list (if any) |
26 | named_parameter_map_t named_parameters; |
27 | |
28 | public: |
29 | unique_ptr<PragmaInfo> Copy() const { |
30 | auto result = make_uniq<PragmaInfo>(); |
31 | result->name = name; |
32 | result->parameters = parameters; |
33 | result->named_parameters = named_parameters; |
34 | return result; |
35 | } |
36 | }; |
37 | |
38 | } // namespace duckdb |
39 |