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

Public Member Functions

 RemoveFieldInfo (AlterEntryData data, vector< string > column_path, bool if_column_exists, bool cascade)
unique_ptr< AlterInfo > Copy () const override
string ToString () const override
string GetColumnName () const override
void Serialize (Serializer &serializer) const override
Public Member Functions inherited from duckdb::AlterTableInfo
 AlterTableInfo (AlterTableType type, AlterEntryData data)
CatalogType GetCatalogType () const override
Public Member Functions inherited from duckdb::AlterInfo
 AlterInfo (AlterType type, string catalog, string schema, string name, OnEntryNotFound if_not_found)
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< AlterTableInfo > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::AlterTableInfo
static unique_ptr< AlterInfo > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::AlterInfo
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

vector< string > column_path
 Path to source field.
bool if_column_exists
 Whether or not an error should be thrown if the column does not exist.
bool cascade
 Whether or not the column should be removed if a dependency conflict arises (used by GENERATED columns).
Public Attributes inherited from duckdb::AlterTableInfo
AlterTableType alter_table_type
Public Attributes inherited from duckdb::AlterInfo
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

Additional Inherited Members

Static Public Attributes inherited from duckdb::AlterInfo
static constexpr const ParseInfoType TYPE = ParseInfoType::ALTER_INFO
Protected Member Functions inherited from duckdb::AlterTableInfo
 AlterTableInfo (AlterTableType type)
Protected Member Functions inherited from duckdb::AlterInfo
 AlterInfo (AlterType type)

Constructor & Destructor Documentation

◆ RemoveFieldInfo() [1/2]

duckdb::RemoveFieldInfo::RemoveFieldInfo ( AlterEntryData data,
vector< string > column_path,
bool if_column_exists,
bool cascade )
338542 : AlterTableInfo(AlterTableType::REMOVE_FIELD, std::move(data)), column_path(std::move(column_path_p)),
338544}
vector< string > column_path
Path to source field.
Definition duckdb.hpp:28687
bool cascade
Whether or not the column should be removed if a dependency conflict arises (used by GENERATED column...
Definition duckdb.hpp:28691
bool if_column_exists
Whether or not an error should be thrown if the column does not exist.
Definition duckdb.hpp:28689

◆ ~RemoveFieldInfo()

duckdb::RemoveFieldInfo::~RemoveFieldInfo ( )
override
338545 {
338546}

◆ RemoveFieldInfo() [2/2]

duckdb::RemoveFieldInfo::RemoveFieldInfo ( )
private
338538 : AlterTableInfo(AlterTableType::REMOVE_FIELD) {
338539}

Member Function Documentation

◆ Copy()

unique_ptr< AlterInfo > duckdb::RemoveFieldInfo::Copy ( ) const
overridevirtual

Implements duckdb::AlterInfo.

338548 {
338549 return make_uniq_base<AlterInfo, RemoveFieldInfo>(GetAlterEntryData(), column_path, if_column_exists, cascade);
338550}

◆ ToString()

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

Implements duckdb::AlterInfo.

338552 {
338553 string result = "";
338554 result += "ALTER TABLE ";
338555 if (if_not_found == OnEntryNotFound::RETURN_NULL) {
338556 result += " IF EXISTS";
338557 }
338558 result += QualifierToString(catalog, schema, name);
338559 result += " DROP COLUMN ";
338560 if (if_column_exists) {
338561 result += "IF EXISTS ";
338562 }
338563 for (idx_t i = 0; i < column_path.size(); i++) {
338564 if (i > 0) {
338565 result += ".";
338566 }
338568 }
338569 if (cascade) {
338570 result += " CASCADE";
338571 }
338572 result += ";";
338573 return result;
338574}
static string WriteOptionallyQuoted(const string &text, char quote='"', bool allow_caps = true, KeywordCategory category = KeywordCategory::KEYWORD_NONE)
Writes a string that is optionally quoted + escaped so it can be used as an identifier.
Definition duckdb.cpp:338034
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
string catalog
Catalog name to alter.
Definition duckdb.hpp:28312
OnEntryNotFound if_not_found
if exists
Definition duckdb.hpp:28310
string name
Entry name to alter.
Definition duckdb.hpp:28316
string schema
Schema name to alter.
Definition duckdb.hpp:28314

◆ GetColumnName()

string duckdb::RemoveFieldInfo::GetColumnName ( ) const
inlineoverridevirtual

Reimplemented from duckdb::AlterInfo.

28696 {
28697 return column_path[0];
28698 }

◆ Serialize()

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

Reimplemented from duckdb::AlterTableInfo.

418417 {
418418 AlterTableInfo::Serialize(serializer);
418419 serializer.WritePropertyWithDefault<vector<string>>(400, "column_path", column_path);
418420 serializer.WritePropertyWithDefault<bool>(401, "if_column_exists", if_column_exists);
418421 serializer.WritePropertyWithDefault<bool>(402, "cascade", cascade);
418422}

◆ Deserialize()

unique_ptr< AlterTableInfo > duckdb::RemoveFieldInfo::Deserialize ( Deserializer & deserializer)
static
418424 {
418425 auto result = duckdb::unique_ptr<RemoveFieldInfo>(new RemoveFieldInfo());
418426 deserializer.ReadPropertyWithDefault<vector<string>>(400, "column_path", result->column_path);
418427 deserializer.ReadPropertyWithDefault<bool>(401, "if_column_exists", result->if_column_exists);
418428 deserializer.ReadPropertyWithDefault<bool>(402, "cascade", result->cascade);
418429 return std::move(result);
418430}

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