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

Public Member Functions

 AddFieldInfo (AlterEntryData data, vector< string > column_path, ColumnDefinition new_field, bool if_field_not_exists)
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
void Serialize (Serializer &serializer) 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.
ColumnDefinition new_field
 New field to add.
bool if_field_not_exists
 Whether or not an error should be thrown if the field does not exist.
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

Private Member Functions

 AddFieldInfo (ColumnDefinition new_column)

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

◆ AddFieldInfo() [1/2]

duckdb::AddFieldInfo::AddFieldInfo ( AlterEntryData data,
vector< string > column_path,
ColumnDefinition new_field,
bool if_field_not_exists )
338467 : AlterTableInfo(AlterTableType::ADD_FIELD, std::move(data)), column_path(std::move(column_path_p)),
338468 new_field(std::move(new_field_p)), if_field_not_exists(if_field_not_exists) {
338469}
ColumnDefinition new_field
New field to add.
Definition duckdb.hpp:28634
bool if_field_not_exists
Whether or not an error should be thrown if the field does not exist.
Definition duckdb.hpp:28636
vector< string > column_path
Path to source field.
Definition duckdb.hpp:28632

◆ ~AddFieldInfo()

duckdb::AddFieldInfo::~AddFieldInfo ( )
override
338471 {
338472}

◆ AddFieldInfo() [2/2]

duckdb::AddFieldInfo::AddFieldInfo ( ColumnDefinition new_column)
explicitprivate
338462 : AlterTableInfo(AlterTableType::ADD_FIELD), new_field(std::move(new_field_p)) {
338463}

Member Function Documentation

◆ Copy()

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

Implements duckdb::AlterInfo.

338474 {
338475 return make_uniq_base<AlterInfo, AddFieldInfo>(GetAlterEntryData(), column_path, new_field.Copy(),
338477}

◆ ToString()

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

Implements duckdb::AlterInfo.

338479 {
338480 string result = "";
338481 result += "ALTER TABLE ";
338482 if (if_not_found == OnEntryNotFound::RETURN_NULL) {
338483 result += " IF EXISTS";
338484 }
338485 result += QualifierToString(catalog, schema, name);
338486 result += " ADD COLUMN";
338487 if (if_field_not_exists) {
338488 result += " IF NOT EXISTS";
338489 }
338490 for (auto &path : column_path) {
338491 result += KeywordHelper::WriteOptionallyQuoted(path);
338492 result += ".";
338493 }
338494 throw NotImplementedException("FIXME: column definition to string");
338495 result += ";";
338496 return result;
338497}
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
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::AddFieldInfo::GetColumnName ( ) const
inlineoverridevirtual

Reimplemented from duckdb::AlterInfo.

28641 {
28642 return column_path[0];
28643 }

◆ Serialize()

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

Reimplemented from duckdb::ParseInfo.

418183 {
418184 AlterTableInfo::Serialize(serializer);
418185 serializer.WriteProperty<ColumnDefinition>(400, "new_field", new_field);
418186 serializer.WritePropertyWithDefault<bool>(401, "if_field_not_exists", if_field_not_exists);
418187 serializer.WritePropertyWithDefault<vector<string>>(402, "column_path", column_path);
418188}

◆ Deserialize()

unique_ptr< AlterTableInfo > duckdb::AddFieldInfo::Deserialize ( Deserializer & deserializer)
static
418190 {
418191 auto new_field = deserializer.ReadProperty<ColumnDefinition>(400, "new_field");
418192 auto result = duckdb::unique_ptr<AddFieldInfo>(new AddFieldInfo(std::move(new_field)));
418193 deserializer.ReadPropertyWithDefault<bool>(401, "if_field_not_exists", result->if_field_not_exists);
418194 deserializer.ReadPropertyWithDefault<vector<string>>(402, "column_path", result->column_path);
418195 return std::move(result);
418196}

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