|
|
unique_ptr< SQLStatement > | stmt |
|
ExplainType | explain_type |
|
ExplainFormat | explain_format = ExplainFormat::DEFAULT |
|
StatementType | type |
| | The statement type.
|
|
idx_t | stmt_location = 0 |
| | The statement location within the query string.
|
|
idx_t | stmt_length = 0 |
| | The statement length within the query string.
|
|
case_insensitive_map_t< idx_t > | named_param_map |
| | The map of named parameter to param index.
|
|
string | query |
| | The query text that corresponds to this SQL statement.
|
|
|
static constexpr const StatementType | TYPE = StatementType::EXPLAIN_STATEMENT |
|
static constexpr const StatementType | TYPE = StatementType::INVALID_STATEMENT |
|
| | ExplainStatement (const ExplainStatement &other) |
|
| SQLStatement (const SQLStatement &other)=default |
◆ ExplainStatement() [1/2]
| duckdb::ExplainStatement::ExplainStatement |
( |
unique_ptr< SQLStatement > | stmt, |
|
|
ExplainType | explain_type = ExplainType::EXPLAIN_STANDARD, |
|
|
ExplainFormat | explain_format = ExplainFormat::DEFAULT ) |
|
explicit |
349231 : SQLStatement(StatementType::EXPLAIN_STATEMENT), stmt(std::move(stmt)), explain_type(explain_type),
349232 explain_format(explain_format) {
349233}
◆ ExplainStatement() [2/2]
| duckdb::ExplainStatement::ExplainStatement |
( |
const ExplainStatement & | other | ) |
|
|
protected |
349236 : SQLStatement(other), stmt(other.stmt->Copy()), explain_type(other.explain_type),
349237 explain_format(other.explain_format) {
349238}
◆ Copy()
| unique_ptr< SQLStatement > duckdb::ExplainStatement::Copy |
( |
| ) |
const |
|
overridevirtual |
◆ OptionsToString()
| string duckdb::ExplainStatement::OptionsToString |
( |
| ) |
const |
349244 {
349245 string options;
349246 if (explain_type == ExplainType::EXPLAIN_ANALYZE) {
349247 options += "(";
349248 options += "ANALYZE";
349249 }
349250 if (explain_format != ExplainFormat::DEFAULT) {
349251 if (options.empty()) {
349252 options += "(";
349253 } else {
349254 options += ", ";
349255 }
349257 }
349258 if (!options.empty()) {
349259 options += ")";
349260 }
349261 return options;
349262}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002
◆ ToString()
| string duckdb::ExplainStatement::ToString |
( |
| ) |
const |
|
overridevirtual |
Implements duckdb::SQLStatement.
349264 {
349265 string result = "EXPLAIN";
349266 auto options = OptionsToString();
349267 if (!options.empty()) {
349268 result += " " + options;
349269 }
349270 result += " " + stmt->ToString();
349271 return result;
349272}
The documentation for this class was generated from the following files: