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

Public Member Functions

 DummyBinding (vector< LogicalType > types, vector< string > names, string dummy_name)
BindResult Bind (ColumnRefExpression &col_ref, idx_t depth) override
 Binding macros.
BindResult Bind (LambdaRefExpression &lambda_ref, idx_t depth)
 Binding lambdas.
unique_ptr< ParsedExpression > ParamToArg (ColumnRefExpression &col_ref)
 Returns a copy of the col_ref parameter as a parsed expression.
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 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

Public Attributes

vector< unique_ptr< ParsedExpression > > * arguments
 Arguments (for macros).
string dummy_name
 The name of the dummy binding.

Static Public Attributes

static constexpr const BindingType TYPE = BindingType::DUMMY
static constexpr const char * DUMMY_NAME = "0_macro_parameters"

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.

Detailed Description

DummyBinding is like the Binding, except the alias and index are set by default. Used for binding lambdas and macro parameters.

Constructor & Destructor Documentation

◆ DummyBinding()

duckdb::DummyBinding::DummyBinding ( vector< LogicalType > types,
vector< string > names,
string dummy_name )
385828 : Binding(BindingType::DUMMY, BindingAlias(DummyBinding::DUMMY_NAME + dummy_name), std::move(types),
385829 std::move(names), DConstants::INVALID_INDEX),
385830 dummy_name(std::move(dummy_name)) {
385831}
vector< LogicalType > types
The types of the bound columns.
Definition duckdb.cpp:1345
vector< string > names
Column names of the subquery.
Definition duckdb.cpp:1347
static constexpr const idx_t INVALID_INDEX
The value used to signify an invalid index entry.
Definition duckdb.hpp:1117
string dummy_name
The name of the dummy binding.
Definition duckdb.cpp:1409

Member Function Documentation

◆ Bind() [1/2]

BindResult duckdb::DummyBinding::Bind ( ColumnRefExpression & col_ref,
idx_t depth )
overridevirtual

Binding macros.

Reimplemented from duckdb::Binding.

385833 {
385834 column_t column_index;
385835 if (!TryGetBindingIndex(colref.GetColumnName(), column_index)) {
385836 throw InternalException("Column %s not found in bindings", colref.GetColumnName());
385837 }
385838 ColumnBinding binding(index, column_index);
385839
385840 // we are binding a parameter to create the dummy binding, no arguments are supplied
385841 return BindResult(make_uniq<BoundColumnRefExpression>(colref.GetName(), types[column_index], binding, depth));
385842}
idx_t column_t
Type used for column identifiers.
Definition duckdb.hpp:259
idx_t index
The table index of the binding.
Definition duckdb.cpp:1343
Here is the call graph for this function:

◆ Bind() [2/2]

BindResult duckdb::DummyBinding::Bind ( LambdaRefExpression & lambda_ref,
idx_t depth )

Binding lambdas.

385844 {
385845 column_t column_index;
385846 if (!TryGetBindingIndex(lambdaref.GetName(), column_index)) {
385847 throw InternalException("Column %s not found in bindings", lambdaref.GetName());
385848 }
385849 ColumnBinding binding(index, column_index);
385850 return BindResult(make_uniq<BoundLambdaRefExpression>(lambdaref.GetName(), types[column_index], binding,
385851 lambdaref.lambda_idx, depth));
385852}
Here is the call graph for this function:

◆ ParamToArg()

unique_ptr< ParsedExpression > duckdb::DummyBinding::ParamToArg ( ColumnRefExpression & col_ref)

Returns a copy of the col_ref parameter as a parsed expression.

385854 {
385855 column_t column_index;
385856 if (!TryGetBindingIndex(colref.GetColumnName(), column_index)) {
385857 throw InternalException("Column %s not found in macro", colref.GetColumnName());
385858 }
385859 auto arg = (*arguments)[column_index]->Copy();
385860 arg->SetAlias(colref.GetAlias());
385861 return arg;
385862}
internal::named_arg< T, Char > arg(const S &name, const T &arg)
Definition duckdb.cpp:16242
Here is the call graph for this function:

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