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::TableMacroExtractor Struct Reference

Static Public Member Functions

static idx_t FunctionCount (TableMacroCatalogEntry &entry)
static Value GetFunctionType ()
static Value GetReturnType (TableMacroCatalogEntry &entry, idx_t offset)
static vector< Value > GetParameters (TableMacroCatalogEntry &entry, idx_t offset)
static Value GetParameterTypes (TableMacroCatalogEntry &entry, idx_t offset)
static vector< LogicalType > GetParameterLogicalTypes (TableMacroCatalogEntry &entry, idx_t offset)
static Value GetVarArgs (TableMacroCatalogEntry &entry, idx_t offset)
static Value GetMacroDefinition (TableMacroCatalogEntry &entry, idx_t offset)
static Value IsVolatile (TableMacroCatalogEntry &entry, idx_t offset)
static Value ResultType (TableMacroCatalogEntry &entry, idx_t offset)

Member Function Documentation

◆ FunctionCount()

idx_t duckdb::TableMacroExtractor::FunctionCount ( TableMacroCatalogEntry & entry)
inlinestatic
246641 {
246642 return entry.macros.size();
246643 }

◆ GetFunctionType()

Value duckdb::TableMacroExtractor::GetFunctionType ( )
inlinestatic
246645 {
246646 return Value("table_macro");
246647 }

◆ GetReturnType()

Value duckdb::TableMacroExtractor::GetReturnType ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246649 {
246650 return Value();
246651 }

◆ GetParameters()

vector< Value > duckdb::TableMacroExtractor::GetParameters ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246653 {
246654 vector<Value> results;
246655 auto &macro_entry = *entry.macros[offset];
246656 for (auto &param : macro_entry.parameters) {
246657 D_ASSERT(param->GetExpressionType() == ExpressionType::COLUMN_REF);
246658 auto &colref = param->Cast<ColumnRefExpression>();
246659 results.emplace_back(colref.GetColumnName());
246660 }
246661 return results;
246662 }

◆ GetParameterTypes()

Value duckdb::TableMacroExtractor::GetParameterTypes ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246664 {
246665 vector<Value> results;
246666 auto &macro_entry = *entry.macros[offset];
246667 for (idx_t i = 0; i < macro_entry.parameters.size(); i++) {
246668 const auto has_type = !macro_entry.types.empty() && macro_entry.types[i] != LogicalType::UNKNOWN;
246669 results.emplace_back(has_type ? macro_entry.types[i].ToString() : Value(LogicalType::VARCHAR));
246670 }
246671 return Value::LIST(LogicalType::VARCHAR, std::move(results));
246672 }
static DUCKDB_API Value LIST(const LogicalType &child_type, vector< Value > values)
Create a list value with the given entries.
Definition duckdb.cpp:132555
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ GetParameterLogicalTypes()

vector< LogicalType > duckdb::TableMacroExtractor::GetParameterLogicalTypes ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246674 {
246675 vector<LogicalType> results;
246676 auto &macro_entry = *entry.macros[offset];
246677 for (idx_t i = 0; i < macro_entry.parameters.size(); i++) {
246678 results.emplace_back(macro_entry.types.empty() ? LogicalType::UNKNOWN : macro_entry.types[i]);
246679 }
246680 return results;
246681 }

◆ GetVarArgs()

Value duckdb::TableMacroExtractor::GetVarArgs ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246683 {
246684 return Value();
246685 }

◆ GetMacroDefinition()

Value duckdb::TableMacroExtractor::GetMacroDefinition ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246687 {
246688 auto &macro_entry = *entry.macros[offset];
246689 if (macro_entry.type == MacroType::TABLE_MACRO) {
246690 auto &func = macro_entry.Cast<TableMacroFunction>();
246691 return func.query_node->ToString();
246692 }
246693 return Value();
246694 }

◆ IsVolatile()

Value duckdb::TableMacroExtractor::IsVolatile ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246696 {
246697 return Value();
246698 }

◆ ResultType()

Value duckdb::TableMacroExtractor::ResultType ( TableMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246700 {
246701 return Value();
246702 }

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