Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::ExplainStatement Class Reference
Inheritance diagram for duckdb::ExplainStatement:
Collaboration diagram for duckdb::ExplainStatement:

Public Member Functions

 ExplainStatement (unique_ptr< SQLStatement > stmt, ExplainType explain_type=ExplainType::EXPLAIN_STANDARD, ExplainFormat explain_format=ExplainFormat::DEFAULT)
unique_ptr< SQLStatement > Copy () const override
 Create a copy of this SelectStatement.
string OptionsToString () const
string ToString () const override
Public Member Functions inherited from duckdb::SQLStatement
 SQLStatement (StatementType type)
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

unique_ptr< SQLStatement > stmt
ExplainType explain_type
ExplainFormat explain_format = ExplainFormat::DEFAULT
Public Attributes inherited from duckdb::SQLStatement
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 Public Attributes

static constexpr const StatementType TYPE = StatementType::EXPLAIN_STATEMENT
Static Public Attributes inherited from duckdb::SQLStatement
static constexpr const StatementType TYPE = StatementType::INVALID_STATEMENT

Protected Member Functions

 ExplainStatement (const ExplainStatement &other)
Protected Member Functions inherited from duckdb::SQLStatement
 SQLStatement (const SQLStatement &other)=default

Constructor & Destructor Documentation

◆ 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}

Member Function Documentation

◆ Copy()

unique_ptr< SQLStatement > duckdb::ExplainStatement::Copy ( ) const
overridevirtual

Create a copy of this SelectStatement.

Implements duckdb::SQLStatement.

349240 {
349241 return unique_ptr<ExplainStatement>(new ExplainStatement(*this));
349242}

◆ 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 }
349256 options += StringUtil::Format("FORMAT %s", EnumUtil::ToString(explain_format));
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: