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::CTEBinding Struct Reference
Inheritance diagram for duckdb::CTEBinding:
Collaboration diagram for duckdb::CTEBinding:

Public Member Functions

 CTEBinding (BindingAlias alias, vector< LogicalType > types, vector< string > names, idx_t index, CTEType type)
 CTEBinding (BindingAlias alias, shared_ptr< CTEBindState > bind_state, idx_t index)
bool CanBeReferenced () const
bool IsReferenced () const
void Reference ()
Public Member Functions inherited from duckdb::Binding
 Binding (BindingType binding_type, BindingAlias alias, vector< LogicalType > types, vector< string > names, idx_t index)
bool TryGetBindingIndex (const string &column_name, column_t &column_index)
column_t GetBindingIndex (const string &column_name)
bool HasMatchingBinding (const string &column_name)
virtual ErrorData ColumnNotFoundError (const string &column_name) const
virtual BindResult Bind (ColumnRefExpression &colref, idx_t depth)
virtual optional_ptr< StandardEntry > GetStandardEntry ()
string GetAlias () const
BindingType GetBindingType ()
const BindingAlias & GetBindingAlias ()
idx_t GetIndex ()
const vector< LogicalType > & GetColumnTypes ()
const vector< string > & GetColumnNames ()
idx_t GetColumnCount ()
void SetColumnType (idx_t col_idx, LogicalType type)
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Attributes

static constexpr const BindingType TYPE = BindingType::CTE

Private Attributes

CTEType cte_type
idx_t reference_count
shared_ptr< CTEBindState > bind_state

Additional Inherited Members

Static Public Member Functions inherited from duckdb::Binding
static BindingAlias GetAlias (const string &explicit_alias, const StandardEntry &entry)
static BindingAlias GetAlias (const string &explicit_alias, optional_ptr< StandardEntry > entry)
Protected Member Functions inherited from duckdb::Binding
void Initialize ()
Protected Attributes inherited from duckdb::Binding
BindingType binding_type
 The type of Binding.
BindingAlias alias
 The alias of the binding.
idx_t index
 The table index of the binding.
vector< LogicalType > types
 The types of the bound columns.
vector< string > names
 Column names of the subquery.
case_insensitive_map_t< column_t > name_map
 Name -> index for the names.

Constructor & Destructor Documentation

◆ CTEBinding() [1/2]

duckdb::CTEBinding::CTEBinding ( BindingAlias alias,
vector< LogicalType > types,
vector< string > names,
idx_t index,
CTEType type )
385866 : Binding(BindingType::CTE, std::move(alias), std::move(types), std::move(names), index), cte_type(cte_type),
385867 reference_count(0) {
385868}
idx_t index
The table index of the binding.
Definition duckdb.cpp:1343
vector< LogicalType > types
The types of the bound columns.
Definition duckdb.cpp:1345
BindingAlias alias
The alias of the binding.
Definition duckdb.cpp:1341
vector< string > names
Column names of the subquery.
Definition duckdb.cpp:1347

◆ CTEBinding() [2/2]

duckdb::CTEBinding::CTEBinding ( BindingAlias alias,
shared_ptr< CTEBindState > bind_state,
idx_t index )
385871 : Binding(BindingType::CTE, std::move(alias_p), vector<LogicalType>(), vector<string>(), index),
385872 cte_type(CTEType::CAN_BE_REFERENCED), reference_count(0), bind_state(std::move(bind_state_p)) {
385873}

Member Function Documentation

◆ CanBeReferenced()

bool duckdb::CTEBinding::CanBeReferenced ( ) const
385875 {
385876 return cte_type == CTEType::CAN_BE_REFERENCED;
385877}

◆ IsReferenced()

bool duckdb::CTEBinding::IsReferenced ( ) const
385879 {
385880 return reference_count > 0;
385881}

◆ Reference()

void duckdb::CTEBinding::Reference ( )
385883 {
385884 if (!CanBeReferenced()) {
385885 throw InternalException("CTE cannot be referenced!");
385886 }
385887 if (bind_state) {
385888 // we have not bound the CTE yet - bind it
385889 bind_state->Bind(*this);
385890
385891 // copy over the names / types and initialize the binding
385892 this->names = bind_state->names;
385893 this->types = bind_state->types;
385894 Initialize();
385895
385896 // finalize binding
385897 bind_state.reset();
385898 }
385899 reference_count++;
385900}

The documentation for this struct was generated from the following file: