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

Static Public Member Functions

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

Member Function Documentation

◆ FunctionCount()

idx_t duckdb::MacroExtractor::FunctionCount ( ScalarMacroCatalogEntry & entry)
inlinestatic
246578 {
246579 return entry.macros.size();
246580 }

◆ GetFunctionType()

Value duckdb::MacroExtractor::GetFunctionType ( )
inlinestatic
246582 {
246583 return Value("macro");
246584 }

◆ GetReturnType()

Value duckdb::MacroExtractor::GetReturnType ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246586 {
246587 return Value();
246588 }

◆ GetParameters()

vector< Value > duckdb::MacroExtractor::GetParameters ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246590 {
246591 vector<Value> results;
246592 auto &macro_entry = *entry.macros[offset];
246593 for (auto &param : macro_entry.parameters) {
246594 D_ASSERT(param->GetExpressionType() == ExpressionType::COLUMN_REF);
246595 auto &colref = param->Cast<ColumnRefExpression>();
246596 results.emplace_back(colref.GetColumnName());
246597 }
246598 return results;
246599 }

◆ GetParameterTypes()

Value duckdb::MacroExtractor::GetParameterTypes ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246601 {
246602 vector<Value> results;
246603 auto &macro_entry = *entry.macros[offset];
246604 for (idx_t i = 0; i < macro_entry.parameters.size(); i++) {
246605 const auto has_type = !macro_entry.types.empty() && macro_entry.types[i] != LogicalType::UNKNOWN;
246606 results.emplace_back(has_type ? macro_entry.types[i].ToString() : Value(LogicalType::VARCHAR));
246607 }
246608 return Value::LIST(LogicalType::VARCHAR, std::move(results));
246609 }
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::MacroExtractor::GetParameterLogicalTypes ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246611 {
246612 vector<LogicalType> results;
246613 auto &macro_entry = *entry.macros[offset];
246614 for (idx_t i = 0; i < macro_entry.parameters.size(); i++) {
246615 results.emplace_back(macro_entry.types.empty() ? LogicalType::UNKNOWN : macro_entry.types[i]);
246616 }
246617 return results;
246618 }

◆ GetVarArgs()

Value duckdb::MacroExtractor::GetVarArgs ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246620 {
246621 return Value();
246622 }

◆ GetMacroDefinition()

Value duckdb::MacroExtractor::GetMacroDefinition ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246624 {
246625 auto &macro_entry = *entry.macros[offset];
246626 D_ASSERT(macro_entry.type == MacroType::SCALAR_MACRO);
246627 auto &func = macro_entry.Cast<ScalarMacroFunction>();
246628 return func.expression->ToString();
246629 }

◆ IsVolatile()

Value duckdb::MacroExtractor::IsVolatile ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246631 {
246632 return Value();
246633 }

◆ ResultType()

Value duckdb::MacroExtractor::ResultType ( ScalarMacroCatalogEntry & entry,
idx_t offset )
inlinestatic
246635 {
246636 return Value();
246637 }

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