| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/parser/statement/explain_statement.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/parser/parsed_expression.hpp" |
| 12 | #include "duckdb/parser/sql_statement.hpp" |
| 13 | |
| 14 | namespace duckdb { |
| 15 | |
| 16 | enum class ExplainType : uint8_t { EXPLAIN_STANDARD, EXPLAIN_ANALYZE }; |
| 17 | |
| 18 | class ExplainStatement : public SQLStatement { |
| 19 | public: |
| 20 | static constexpr const StatementType TYPE = StatementType::EXPLAIN_STATEMENT; |
| 21 | |
| 22 | public: |
| 23 | explicit ExplainStatement(unique_ptr<SQLStatement> stmt, ExplainType explain_type = ExplainType::EXPLAIN_STANDARD); |
| 24 | |
| 25 | unique_ptr<SQLStatement> stmt; |
| 26 | ExplainType explain_type; |
| 27 | |
| 28 | protected: |
| 29 | ExplainStatement(const ExplainStatement &other); |
| 30 | |
| 31 | public: |
| 32 | unique_ptr<SQLStatement> Copy() const override; |
| 33 | }; |
| 34 | |
| 35 | } // namespace duckdb |
| 36 |