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::ExpressionListRef Class Reference
Inheritance diagram for duckdb::ExpressionListRef:
Collaboration diagram for duckdb::ExpressionListRef:

Public Member Functions

string ToString () const override
 Convert the object to a string.
bool Equals (const TableRef &other_p) const override
unique_ptr< TableRef > Copy () override
void Serialize (Serializer &serializer) const override
 Deserializes a blob back into a ExpressionListRef.
Public Member Functions inherited from duckdb::TableRef
 TableRef (TableReferenceType type)
void Print ()
void CopyProperties (TableRef &target) const
 Copy the properties of this table ref to the target.
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static unique_ptr< TableRef > Deserialize (Deserializer &source)
Static Public Member Functions inherited from duckdb::TableRef
static bool Equals (const unique_ptr< TableRef > &left, const unique_ptr< TableRef > &right)
static unique_ptr< TableRef > Deserialize (Deserializer &deserializer)

Public Attributes

vector< vector< unique_ptr< ParsedExpression > > > values
 Value list like in a VALUES statement.
vector< LogicalType > expected_types
 Expected table types.
vector< string > expected_names
 Expected table names.
Public Attributes inherited from duckdb::TableRef
TableReferenceType type
string alias
unique_ptr< SampleOptions > sample
 Sample options (if any).
optional_idx query_location
 The location in the query (if any).
shared_ptr< ExternalDependency > external_dependency
 External dependencies of this table function.
vector< string > column_name_alias
 Aliases for the column names.

Static Public Attributes

static constexpr const TableReferenceType TYPE = TableReferenceType::EXPRESSION_LIST
Static Public Attributes inherited from duckdb::TableRef
static constexpr const TableReferenceType TYPE = TableReferenceType::INVALID

Additional Inherited Members

Protected Member Functions inherited from duckdb::TableRef
string BaseToString (string result) const
string BaseToString (string result, const vector< string > &column_name_alias) const
string AliasToString (const vector< string > &column_name_alias) const
string SampleToString () const

Detailed Description

A table reference that consists of a list of expressions. The expression list is generated by, e.g., a VALUES statement.

Constructor & Destructor Documentation

◆ ExpressionListRef()

duckdb::ExpressionListRef::ExpressionListRef ( )
inline
261282 : TableRef(TableReferenceType::EXPRESSION_LIST) {
261283 }

Member Function Documentation

◆ ToString()

string duckdb::ExpressionListRef::ToString ( ) const
overridevirtual

Convert the object to a string.

Implements duckdb::TableRef.

350446 {
350447 D_ASSERT(!values.empty());
350448 string result = "(VALUES ";
350449 for (idx_t row_idx = 0; row_idx < values.size(); row_idx++) {
350450 if (row_idx > 0) {
350451 result += ", ";
350452 }
350453 auto &row = values[row_idx];
350454 result += "(";
350455 for (idx_t col_idx = 0; col_idx < row.size(); col_idx++) {
350456 if (col_idx > 0) {
350457 result += ", ";
350458 }
350459 result += row[col_idx]->ToString();
350460 }
350461 result += ")";
350462 }
350463 result += ")";
350464 return BaseToString(result, expected_names);
350465}
vector< vector< unique_ptr< ParsedExpression > > > values
Value list like in a VALUES statement.
Definition duckdb.cpp:261286
vector< string > expected_names
Expected table names.
Definition duckdb.cpp:261290
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ Equals()

bool duckdb::ExpressionListRef::Equals ( const TableRef & other_p) const
overridevirtual

Reimplemented from duckdb::TableRef.

350467 {
350468 if (!TableRef::Equals(other_p)) {
350469 return false;
350470 }
350471 auto &other = other_p.Cast<ExpressionListRef>();
350472 if (values.size() != other.values.size()) {
350473 return false;
350474 }
350475 for (idx_t i = 0; i < values.size(); i++) {
350476 if (values[i].size() != other.values[i].size()) {
350477 return false;
350478 }
350479 for (idx_t j = 0; j < values[i].size(); j++) {
350480 if (!values[i][j]->Equals(*other.values[i][j])) {
350481 return false;
350482 }
350483 }
350484 }
350485 return true;
350486}
GOpaque< Size > size(const GMat &src)

◆ Copy()

unique_ptr< TableRef > duckdb::ExpressionListRef::Copy ( )
overridevirtual

Implements duckdb::TableRef.

350488 {
350489 // value list
350490 auto result = make_uniq<ExpressionListRef>();
350491 for (auto &val_list : values) {
350492 vector<unique_ptr<ParsedExpression>> new_val_list;
350493 new_val_list.reserve(val_list.size());
350494 for (auto &val : val_list) {
350495 new_val_list.push_back(val->Copy());
350496 }
350497 result->values.push_back(std::move(new_val_list));
350498 }
350499 result->expected_names = expected_names;
350500 result->expected_types = expected_types;
350501 CopyProperties(*result);
350502 return std::move(result);
350503}
vector< LogicalType > expected_types
Expected table types.
Definition duckdb.cpp:261288
void CopyProperties(TableRef &target) const
Copy the properties of this table ref to the target.
Definition duckdb.cpp:351228

◆ Serialize()

void duckdb::ExpressionListRef::Serialize ( Serializer & serializer) const
overridevirtual

Deserializes a blob back into a ExpressionListRef.

Reimplemented from duckdb::TableRef.

419691 {
419692 TableRef::Serialize(serializer);
419693 serializer.WritePropertyWithDefault<vector<string>>(200, "expected_names", expected_names);
419694 serializer.WritePropertyWithDefault<vector<LogicalType>>(201, "expected_types", expected_types);
419695 serializer.WritePropertyWithDefault<vector<vector<unique_ptr<ParsedExpression>>>>(202, "values", values);
419696}

◆ Deserialize()

unique_ptr< TableRef > duckdb::ExpressionListRef::Deserialize ( Deserializer & source)
static
419698 {
419699 auto result = duckdb::unique_ptr<ExpressionListRef>(new ExpressionListRef());
419700 deserializer.ReadPropertyWithDefault<vector<string>>(200, "expected_names", result->expected_names);
419701 deserializer.ReadPropertyWithDefault<vector<LogicalType>>(201, "expected_types", result->expected_types);
419702 deserializer.ReadPropertyWithDefault<vector<vector<unique_ptr<ParsedExpression>>>>(202, "values", result->values);
419703 return std::move(result);
419704}

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