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::UnboundTypeInfo Struct Reference
Inheritance diagram for duckdb::UnboundTypeInfo:
Collaboration diagram for duckdb::UnboundTypeInfo:

Public Member Functions

 UnboundTypeInfo (unique_ptr< ParsedExpression > expr_p)
 
void Serialize (Serializer &serializer) const override
 
shared_ptr< ExtraTypeInfoCopy () const override
 
- Public Member Functions inherited from duckdb::ExtraTypeInfo
 ExtraTypeInfo (ExtraTypeInfoType type)
 
 ExtraTypeInfo (ExtraTypeInfoType type, string alias)
 
bool Equals (ExtraTypeInfo *other_p) const
 
virtual shared_ptr< ExtraTypeInfoDeepCopy () const
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Static Public Member Functions

static shared_ptr< ExtraTypeInfoDeserialize (Deserializer &source)
 
- Static Public Member Functions inherited from duckdb::ExtraTypeInfo
static shared_ptr< ExtraTypeInfoDeserialize (Deserializer &source)
 

Public Attributes

unique_ptr< ParsedExpressionexpr
 
- Public Attributes inherited from duckdb::ExtraTypeInfo
ExtraTypeInfoType type
 
string alias
 
unique_ptr< ExtensionTypeInfoextension_info
 

Protected Member Functions

bool EqualsInternal (ExtraTypeInfo *other_p) const override
 
- Protected Member Functions inherited from duckdb::ExtraTypeInfo
 ExtraTypeInfo (const ExtraTypeInfo &other)
 
ExtraTypeInfooperator= (const ExtraTypeInfo &other)
 

Constructor & Destructor Documentation

◆ UnboundTypeInfo() [1/2]

duckdb::UnboundTypeInfo::UnboundTypeInfo ( unique_ptr< ParsedExpression expr_p)
explicit
72676 : ExtraTypeInfo(ExtraTypeInfoType::UNBOUND_TYPE_INFO), expr(std::move(expr_p)) {
72677}

◆ UnboundTypeInfo() [2/2]

duckdb::UnboundTypeInfo::UnboundTypeInfo ( )
private
72672 : ExtraTypeInfo(ExtraTypeInfoType::UNBOUND_TYPE_INFO) {
72673}

Member Function Documentation

◆ Serialize()

void duckdb::UnboundTypeInfo::Serialize ( Serializer serializer) const
overridevirtual

Reimplemented from duckdb::ExtraTypeInfo.

72371 {
72372 ExtraTypeInfo::Serialize(serializer);
72373
72374 if (serializer.ShouldSerialize(7)) {
72375 serializer.WritePropertyWithDefault<unique_ptr<ParsedExpression>>(204, "expr", expr);
72376 return;
72377 }
72378
72379 // Try to write this as an old "USER" type, if possible
72380 if (expr->type != ExpressionType::TYPE) {
72381 throw SerializationException(
72382 "Cannot serialize non-type type expression when targeting database storage version '%s'",
72383 serializer.GetOptions().serialization_compatibility.duckdb_version);
72384 }
72385
72386 auto &type_expr = expr->Cast<TypeExpression>();
72387 serializer.WritePropertyWithDefault<string>(200, "name", type_expr.GetTypeName());
72388 serializer.WritePropertyWithDefault<string>(201, "catalog", type_expr.GetCatalog());
72389 serializer.WritePropertyWithDefault<string>(202, "schema", type_expr.GetSchema());
72390
72391 // Try to write the user type mods too
72392 vector<Value> user_type_mods;
72393 for (auto &param : type_expr.GetChildren()) {
72394 if (param->type != ExpressionType::VALUE_CONSTANT) {
72395 throw SerializationException(
72396 "Cannot serialize non-constant type parameter when targeting serialization version %s",
72397 serializer.GetOptions().serialization_compatibility.duckdb_version);
72398 }
72399
72400 auto &const_expr = param->Cast<ConstantExpression>();
72401 user_type_mods.push_back(const_expr.value);
72402 }
72403
72404 serializer.WritePropertyWithDefault<vector<Value>>(203, "user_type_modifiers", user_type_mods);
72405}

◆ Deserialize()

shared_ptr< ExtraTypeInfo > duckdb::UnboundTypeInfo::Deserialize ( Deserializer source)
static
72407 {
72408 auto result = duckdb::shared_ptr<UnboundTypeInfo>(new UnboundTypeInfo());
72409
72410 deserializer.ReadPropertyWithDefault<unique_ptr<ParsedExpression>>(204, "expr", result->expr);
72411
72412 if (!result->expr) {
72413 // This is a legacy "USER" type
72414 string name;
72415 deserializer.ReadPropertyWithDefault<string>(200, "name", name);
72416 string catalog;
72417 deserializer.ReadPropertyWithDefault<string>(201, "catalog", catalog);
72418 string schema;
72419 deserializer.ReadPropertyWithDefault<string>(202, "schema", schema);
72420
72421 vector<unique_ptr<ParsedExpression>> user_type_mods;
72422 auto mods = deserializer.ReadPropertyWithDefault<vector<Value>>(203, "user_type_modifiers");
72423 for (auto &mod : mods) {
72424 user_type_mods.push_back(make_uniq_base<ParsedExpression, ConstantExpression>(mod));
72425 }
72426
72427 result->expr = make_uniq<TypeExpression>(catalog, schema, name, std::move(user_type_mods));
72428 }
72429
72430 return std::move(result);
72431}
Definition duckdb.hpp:960

◆ Copy()

shared_ptr< ExtraTypeInfo > duckdb::UnboundTypeInfo::Copy ( ) const
overridevirtual

Reimplemented from duckdb::ExtraTypeInfo.

72687 {
72688 return make_shared_ptr<UnboundTypeInfo>(expr->Copy());
72689}

◆ EqualsInternal()

bool duckdb::UnboundTypeInfo::EqualsInternal ( ExtraTypeInfo other_p) const
overrideprotectedvirtual

Reimplemented from duckdb::ExtraTypeInfo.

72679 {
72680 auto &other = other_p->Cast<UnboundTypeInfo>();
72681 if (!expr->Equals(*other.expr)) {
72682 return false;
72683 }
72684 return true;
72685}

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