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::SubqueryRef Class Reference

Represents a subquery. More...

Inheritance diagram for duckdb::SubqueryRef:
Collaboration diagram for duckdb::SubqueryRef:

Public Member Functions

DUCKDB_API SubqueryRef (unique_ptr< SelectStatement > subquery, string alias=string())
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 SubqueryRef.
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

unique_ptr< SelectStatement > subquery
 The subquery.
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::SUBQUERY
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

Represents a subquery.

Constructor & Destructor Documentation

◆ SubqueryRef() [1/2]

duckdb::SubqueryRef::SubqueryRef ( )
private
351113 : TableRef(TableReferenceType::SUBQUERY) {
351114}

◆ SubqueryRef() [2/2]

duckdb::SubqueryRef::SubqueryRef ( unique_ptr< SelectStatement > subquery,
string alias = string() )
explicit
351117 : TableRef(TableReferenceType::SUBQUERY), subquery(std::move(subquery_p)) {
351118 this->alias = std::move(alias_p);
351119}
unique_ptr< SelectStatement > subquery
The subquery.
Definition duckdb.cpp:242481

Member Function Documentation

◆ ToString()

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

Convert the object to a string.

Implements duckdb::TableRef.

351108 {
351109 string result = "(" + subquery->ToString() + ")";
351110 return BaseToString(result, column_name_alias);
351111}
vector< string > column_name_alias
Aliases for the column names.
Definition duckdb.hpp:53744

◆ Equals()

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

Reimplemented from duckdb::TableRef.

351121 {
351122 if (!TableRef::Equals(other_p)) {
351123 return false;
351124 }
351125 auto &other = other_p.Cast<SubqueryRef>();
351126 return subquery->Equals(*other.subquery);
351127}

◆ Copy()

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

Implements duckdb::TableRef.

351129 {
351130 auto copy = make_uniq<SubqueryRef>(unique_ptr_cast<SQLStatement, SelectStatement>(subquery->Copy()), alias);
351131 copy->column_name_alias = column_name_alias;
351132 CopyProperties(*copy);
351133 return std::move(copy);
351134}
void CopyProperties(TableRef &target) const
Copy the properties of this table ref to the target.
Definition duckdb.cpp:351228

◆ Serialize()

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

Deserializes a blob back into a SubqueryRef.

Reimplemented from duckdb::TableRef.

419777 {
419778 TableRef::Serialize(serializer);
419779 serializer.WritePropertyWithDefault<unique_ptr<SelectStatement>>(200, "subquery", subquery);
419780 serializer.WritePropertyWithDefault<vector<string>>(201, "column_name_alias", column_name_alias);
419781}

◆ Deserialize()

unique_ptr< TableRef > duckdb::SubqueryRef::Deserialize ( Deserializer & source)
static
419783 {
419784 auto result = duckdb::unique_ptr<SubqueryRef>(new SubqueryRef());
419785 deserializer.ReadPropertyWithDefault<unique_ptr<SelectStatement>>(200, "subquery", result->subquery);
419786 deserializer.ReadPropertyWithDefault<vector<string>>(201, "column_name_alias", result->column_name_alias);
419787 return std::move(result);
419788}

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