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

Static Public Member Functions

static DUCKDB_API const child_list_t< LogicalType > & GetChildTypes (const LogicalType &type)
static DUCKDB_API const LogicalType & GetChildType (const LogicalType &type, idx_t index)
static DUCKDB_API const string & GetChildName (const LogicalType &type, idx_t index)
static DUCKDB_API idx_t GetChildIndexUnsafe (const LogicalType &type, const string &name)
static DUCKDB_API idx_t GetChildCount (const LogicalType &type)
static DUCKDB_API bool IsUnnamed (const LogicalType &type)

Member Function Documentation

◆ GetChildTypes()

const child_list_t< LogicalType > & duckdb::StructType::GetChildTypes ( const LogicalType & type)
static
140607 {
140608 D_ASSERT(type.id() == LogicalTypeId::STRUCT || type.id() == LogicalTypeId::UNION ||
140609 type.id() == LogicalTypeId::VARIANT);
140610
140611 auto info = type.AuxInfo();
140612 D_ASSERT(info);
140613 return info->Cast<StructTypeInfo>().child_types;
140614}

◆ GetChildType()

const LogicalType & duckdb::StructType::GetChildType ( const LogicalType & type,
idx_t index )
static
140616 {
140617 auto &child_types = StructType::GetChildTypes(type);
140618 D_ASSERT(index < child_types.size());
140619 return child_types[index].second;
140620}
index

◆ GetChildName()

const string & duckdb::StructType::GetChildName ( const LogicalType & type,
idx_t index )
static
140622 {
140623 auto &child_types = StructType::GetChildTypes(type);
140624 D_ASSERT(index < child_types.size());
140625 return child_types[index].first;
140626}

◆ GetChildIndexUnsafe()

idx_t duckdb::StructType::GetChildIndexUnsafe ( const LogicalType & type,
const string & name )
static
140628 {
140629 auto &child_types = StructType::GetChildTypes(type);
140630 for (idx_t i = 0; i < child_types.size(); i++) {
140631 if (StringUtil::CIEquals(child_types[i].first, name)) {
140632 return i;
140633 }
140634 }
140635 throw InternalException("Could not find child with name \"%s\" in struct type \"%s\"", name, type.ToString());
140636}
static DUCKDB_API bool CIEquals(const string &l1, const string &l2)
Case insensitive equals.
Definition duckdb.cpp:109696
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ GetChildCount()

idx_t duckdb::StructType::GetChildCount ( const LogicalType & type)
static
140638 {
140639 return StructType::GetChildTypes(type).size();
140640}

◆ IsUnnamed()

bool duckdb::StructType::IsUnnamed ( const LogicalType & type)
static
140641 {
140642 auto &child_types = StructType::GetChildTypes(type);
140643 if (child_types.empty()) {
140644 return false;
140645 }
140646 return child_types[0].first.empty(); // NOLINT
140647}

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