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

Represents a TableReference to a materialized result. More...

Inheritance diagram for duckdb::ColumnDataRef:
Collaboration diagram for duckdb::ColumnDataRef:

Public Member Functions

 ColumnDataRef (optionally_owned_ptr< ColumnDataCollection > collection_p, vector< string > expected_names=vector< 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 ColumnDataRef.
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< string > expected_names
 The set of expected names.
optionally_owned_ptr< ColumnDataCollection > collection
 (Optionally) the owned collection
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::COLUMN_DATA
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 TableReference to a materialized result.

Constructor & Destructor Documentation

◆ ColumnDataRef()

duckdb::ColumnDataRef::ColumnDataRef ( optionally_owned_ptr< ColumnDataCollection > collection_p,
vector< string > expected_names = vector<string>() )
explicit
350324 : TableRef(TableReferenceType::COLUMN_DATA), expected_names(std::move(expected_names)),
350325 collection(std::move(collection_p)) {
350326}
optionally_owned_ptr< ColumnDataCollection > collection
(Optionally) the owned collection
Definition duckdb.cpp:261196
vector< string > expected_names
The set of expected names.
Definition duckdb.cpp:261194

Member Function Documentation

◆ ToString()

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

Convert the object to a string.

Implements duckdb::TableRef.

350328 {
350329 auto result = collection->ToString();
350330 return BaseToString(result, expected_names);
350331}

◆ Equals()

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

Reimplemented from duckdb::TableRef.

350333 {
350334 if (!TableRef::Equals(other_p)) {
350335 return false;
350336 }
350337 auto &other = other_p.Cast<ColumnDataRef>();
350338 auto expected_types = collection->Types();
350339 auto other_expected_types = other.collection->Types();
350340 if (expected_types.size() != other_expected_types.size()) {
350341 return false;
350342 }
350343 if (expected_names.size() != other.expected_names.size()) {
350344 return false;
350345 }
350346 D_ASSERT(expected_types.size() == expected_names.size());
350347 for (idx_t i = 0; i < expected_types.size(); i++) {
350348 auto &this_type = expected_types[i];
350349 auto &other_type = other_expected_types[i];
350350
350351 auto &this_name = expected_names[i];
350352 auto &other_name = other.expected_names[i];
350353
350354 if (this_type != other_type) {
350355 return false;
350356 }
350357 if (!StringUtil::CIEquals(this_name, other_name)) {
350358 return false;
350359 }
350360 }
350361 string unused;
350362 if (!ColumnDataCollection::ResultEquals(*collection, *other.collection, unused, true)) {
350363 return false;
350364 }
350365 return true;
350366}
static bool ResultEquals(const ColumnDataCollection &left, const ColumnDataCollection &right, string &error_message, bool ordered=false)
Definition duckdb.cpp:115741
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

◆ Copy()

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

Implements duckdb::TableRef.

350387 {
350388 auto copied_collection = CopyCollection(collection);
350389 auto result = make_uniq<ColumnDataRef>(std::move(copied_collection), expected_names);
350390 CopyProperties(*result);
350391 return std::move(result);
350392}
void CopyProperties(TableRef &target) const
Copy the properties of this table ref to the target.
Definition duckdb.cpp:351228

◆ Serialize()

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

Deserializes a blob back into a ColumnDataRef.

Reimplemented from duckdb::TableRef.

419669 {
419670 TableRef::Serialize(serializer);
419671 serializer.WritePropertyWithDefault<vector<string>>(200, "expected_names", expected_names);
419672 serializer.WritePropertyWithDefault<optionally_owned_ptr<ColumnDataCollection>>(202, "collection", collection);
419673}

◆ Deserialize()

unique_ptr< TableRef > duckdb::ColumnDataRef::Deserialize ( Deserializer & source)
static
419675 {
419676 auto expected_names = deserializer.ReadPropertyWithDefault<vector<string>>(200, "expected_names");
419677 auto collection = deserializer.ReadPropertyWithDefault<optionally_owned_ptr<ColumnDataCollection>>(202, "collection");
419678 auto result = duckdb::unique_ptr<ColumnDataRef>(new ColumnDataRef(std::move(collection), std::move(expected_names)));
419679 return std::move(result);
419680}

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