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::AlterInfo Struct Referenceabstract
Inheritance diagram for duckdb::AlterInfo:
Collaboration diagram for duckdb::AlterInfo:

Public Member Functions

 AlterInfo (AlterType type, string catalog, string schema, string name, OnEntryNotFound if_not_found)
virtual CatalogType GetCatalogType () const =0
virtual unique_ptr< AlterInfo > Copy () const =0
virtual string ToString () const =0
void Serialize (Serializer &serializer) const override
virtual string GetColumnName () const
AlterEntryData GetAlterEntryData () const
bool IsAddPrimaryKey () const
Public Member Functions inherited from duckdb::ParseInfo
 ParseInfo (ParseInfoType info_type)
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static unique_ptr< ParseInfo > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::ParseInfo
static unique_ptr< ParseInfo > Deserialize (Deserializer &deserializer)
static string QualifierToString (const string &catalog, const string &schema, const string &name)
static string TypeToString (CatalogType type)

Public Attributes

AlterType type
OnEntryNotFound if_not_found
 if exists
string catalog
 Catalog name to alter.
string schema
 Schema name to alter.
string name
 Entry name to alter.
bool allow_internal
 Allow altering internal entries.
unique_ptr< LogicalDependencyList > new_dependencies
 New dependencies for the altered entry (set during binding).
Public Attributes inherited from duckdb::ParseInfo
ParseInfoType info_type

Static Public Attributes

static constexpr const ParseInfoType TYPE = ParseInfoType::ALTER_INFO

Protected Member Functions

 AlterInfo (AlterType type)

Constructor & Destructor Documentation

◆ AlterInfo() [1/2]

duckdb::AlterInfo::AlterInfo ( AlterType type,
string catalog,
string schema,
string name,
OnEntryNotFound if_not_found )
338096 : ParseInfo(TYPE), type(type), if_not_found(if_not_found), catalog(std::move(catalog_p)),
338097 schema(std::move(schema_p)), name(std::move(name_p)), allow_internal(false) {
338098}
string catalog
Catalog name to alter.
Definition duckdb.hpp:28312
OnEntryNotFound if_not_found
if exists
Definition duckdb.hpp:28310
bool allow_internal
Allow altering internal entries.
Definition duckdb.hpp:28318
string name
Entry name to alter.
Definition duckdb.hpp:28316
string schema
Schema name to alter.
Definition duckdb.hpp:28314

◆ ~AlterInfo()

duckdb::AlterInfo::~AlterInfo ( )
override
338103 {
338104}

◆ AlterInfo() [2/2]

duckdb::AlterInfo::AlterInfo ( AlterType type)
explicitprotected
338100 : ParseInfo(TYPE), type(type) {
338101}

Member Function Documentation

◆ Serialize()

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

Reimplemented from duckdb::ParseInfo.

418009 {
418010 ParseInfo::Serialize(serializer);
418011 serializer.WriteProperty<AlterType>(200, "type", type);
418012 serializer.WritePropertyWithDefault<string>(201, "catalog", catalog);
418013 serializer.WritePropertyWithDefault<string>(202, "schema", schema);
418014 serializer.WritePropertyWithDefault<string>(203, "name", name);
418015 serializer.WriteProperty<OnEntryNotFound>(204, "if_not_found", if_not_found);
418016 serializer.WritePropertyWithDefault<bool>(205, "allow_internal", allow_internal);
418017}

◆ Deserialize()

unique_ptr< ParseInfo > duckdb::AlterInfo::Deserialize ( Deserializer & deserializer)
static
418019 {
418020 auto type = deserializer.ReadProperty<AlterType>(200, "type");
418021 auto catalog = deserializer.ReadPropertyWithDefault<string>(201, "catalog");
418022 auto schema = deserializer.ReadPropertyWithDefault<string>(202, "schema");
418023 auto name = deserializer.ReadPropertyWithDefault<string>(203, "name");
418024 auto if_not_found = deserializer.ReadProperty<OnEntryNotFound>(204, "if_not_found");
418025 auto allow_internal = deserializer.ReadPropertyWithDefault<bool>(205, "allow_internal");
418026 unique_ptr<AlterInfo> result;
418027 switch (type) {
418028 case AlterType::ALTER_DATABASE:
418029 result = AlterDatabaseInfo::Deserialize(deserializer);
418030 break;
418031 case AlterType::ALTER_TABLE:
418032 result = AlterTableInfo::Deserialize(deserializer);
418033 break;
418034 case AlterType::ALTER_VIEW:
418035 result = AlterViewInfo::Deserialize(deserializer);
418036 break;
418037 case AlterType::CHANGE_OWNERSHIP:
418038 result = ChangeOwnershipInfo::Deserialize(deserializer);
418039 break;
418040 case AlterType::SET_COLUMN_COMMENT:
418041 result = SetColumnCommentInfo::Deserialize(deserializer);
418042 break;
418043 case AlterType::SET_COMMENT:
418044 result = SetCommentInfo::Deserialize(deserializer);
418045 break;
418046 default:
418047 throw SerializationException("Unsupported type for deserialization of AlterInfo!");
418048 }
418049 result->catalog = std::move(catalog);
418050 result->schema = std::move(schema);
418051 result->name = std::move(name);
418052 result->if_not_found = if_not_found;
418053 result->allow_internal = allow_internal;
418054 return std::move(result);
418055}

◆ GetColumnName()

virtual string duckdb::AlterInfo::GetColumnName ( ) const
inlinevirtual
28330 {
28331 return "";
28332 };

◆ GetAlterEntryData()

AlterEntryData duckdb::AlterInfo::GetAlterEntryData ( ) const
338106 {
338107 AlterEntryData data;
338108 data.catalog = catalog;
338109 data.schema = schema;
338110 data.name = name;
338111 data.if_not_found = if_not_found;
338112 return data;
338113}

◆ IsAddPrimaryKey()

bool duckdb::AlterInfo::IsAddPrimaryKey ( ) const
338115 {
338116 if (type != AlterType::ALTER_TABLE) {
338117 return false;
338118 }
338119
338120 auto &table_info = Cast<AlterTableInfo>();
338121 if (table_info.alter_table_type != AlterTableType::ADD_CONSTRAINT) {
338122 return false;
338123 }
338124
338125 auto &constraint_info = table_info.Cast<AddConstraintInfo>();
338126 if (constraint_info.constraint->type != ConstraintType::UNIQUE) {
338127 return false;
338128 }
338129
338130 auto &unique_info = constraint_info.constraint->Cast<UniqueConstraint>();
338131 if (!unique_info.IsPrimaryKey()) {
338132 return false;
338133 }
338134
338135 return true;
338136}

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