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

Public Member Functions

 SetColumnCommentInfo (string catalog, string schema, string name, string column_name, Value comment_value, OnEntryNotFound if_not_found)
optional_ptr< CatalogEntry > TryResolveCatalogEntry (CatalogEntryRetriever &retriever)
unique_ptr< AlterInfo > Copy () const override
CatalogType GetCatalogType () const override
string ToString () 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)
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< 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

CatalogType catalog_entry_type
 The resolved Catalog Type.
string column_name
 name of the column to comment on
Value comment_value
 The comment, can be NULL or a string.
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

Static Public Attributes

static constexpr const ParseInfoType TYPE = ParseInfoType::COMMENT_ON_COLUMN_INFO
Static Public Attributes inherited from duckdb::AlterInfo
static constexpr const ParseInfoType TYPE = ParseInfoType::ALTER_INFO

Additional Inherited Members

Protected Member Functions inherited from duckdb::AlterInfo
 AlterInfo (AlterType type)

Constructor & Destructor Documentation

◆ SetColumnCommentInfo() [1/2]

duckdb::SetColumnCommentInfo::SetColumnCommentInfo ( )
339024 : AlterInfo(AlterType::SET_COLUMN_COMMENT, INVALID_CATALOG, INVALID_SCHEMA, "", OnEntryNotFound::THROW_EXCEPTION),
339025 catalog_entry_type(CatalogType::INVALID), column_name(""), comment_value(Value()) {
339026}
Value comment_value
The comment, can be NULL or a string.
Definition duckdb.cpp:12472
CatalogType catalog_entry_type
The resolved Catalog Type.
Definition duckdb.cpp:12467
string column_name
name of the column to comment on
Definition duckdb.cpp:12470

◆ SetColumnCommentInfo() [2/2]

duckdb::SetColumnCommentInfo::SetColumnCommentInfo ( string catalog,
string schema,
string name,
string column_name,
Value comment_value,
OnEntryNotFound if_not_found )
339030 : AlterInfo(AlterType::SET_COLUMN_COMMENT, std::move(catalog), std::move(schema), std::move(name), if_not_found),
339031 catalog_entry_type(CatalogType::INVALID), column_name(std::move(column_name)),
339032 comment_value(std::move(comment_value)) {
339033}
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

Member Function Documentation

◆ TryResolveCatalogEntry()

optional_ptr< CatalogEntry > duckdb::SetColumnCommentInfo::TryResolveCatalogEntry ( CatalogEntryRetriever & retriever)
339053 {
339054 EntryLookupInfo lookup_info(CatalogType::TABLE_ENTRY, name);
339055 auto entry = retriever.GetEntry(catalog, schema, lookup_info, if_not_found);
339056
339057 if (entry) {
339058 catalog_entry_type = entry->type;
339059 return entry;
339060 }
339061
339062 return nullptr;
339063}

◆ Copy()

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

Implements duckdb::AlterInfo.

339035 {
339036 auto result = make_uniq<SetColumnCommentInfo>(catalog, schema, name, column_name, comment_value, if_not_found);
339037 result->type = type;
339038 return std::move(result);
339039}

◆ GetCatalogType()

CatalogType duckdb::SetColumnCommentInfo::GetCatalogType ( ) const
overridevirtual

Implements duckdb::AlterInfo.

339067 {
339068 if (catalog_entry_type == CatalogType::INVALID) {
339069 throw InternalException("Attempted to access unresolved ");
339070 }
339071 return catalog_entry_type;
339072}

◆ ToString()

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

Implements duckdb::AlterInfo.

339041 {
339042 string result = "";
339043
339044 D_ASSERT(catalog_entry_type == CatalogType::INVALID);
339045 result += "COMMENT ON COLUMN ";
339046 result += QualifierToString(catalog, schema, name);
339047 result += " IS ";
339048 result += comment_value.ToSQLString();
339049 result += ";";
339050 return result;
339051}

◆ Serialize()

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

Reimplemented from duckdb::AlterInfo.

418502 {
418503 AlterInfo::Serialize(serializer);
418504 serializer.WriteProperty<CatalogType>(300, "catalog_entry_type", catalog_entry_type);
418505 serializer.WriteProperty<Value>(301, "comment_value", comment_value);
418506 serializer.WritePropertyWithDefault<string>(302, "column_name", column_name);
418507}

◆ Deserialize()

unique_ptr< AlterInfo > duckdb::SetColumnCommentInfo::Deserialize ( Deserializer & deserializer)
static
418509 {
418510 auto result = duckdb::unique_ptr<SetColumnCommentInfo>(new SetColumnCommentInfo());
418511 deserializer.ReadProperty<CatalogType>(300, "catalog_entry_type", result->catalog_entry_type);
418512 deserializer.ReadProperty<Value>(301, "comment_value", result->comment_value);
418513 deserializer.ReadPropertyWithDefault<string>(302, "column_name", result->column_name);
418514 return std::move(result);
418515}

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