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::TypeCatalogEntry Class Reference

A type catalog entry. More...

Inheritance diagram for duckdb::TypeCatalogEntry:
Collaboration diagram for duckdb::TypeCatalogEntry:

Public Member Functions

 TypeCatalogEntry (Catalog &catalog, SchemaCatalogEntry &schema, CreateTypeInfo &info)
 Create a TypeCatalogEntry and initialize storage for it.
 
unique_ptr< CreateInfoGetInfo () const override
 
unique_ptr< CatalogEntryCopy (ClientContext &context) const override
 
string ToSQL () const override
 Convert the catalog entry to a SQL string that can be used to re-construct the catalog entry.
 
- Public Member Functions inherited from duckdb::StandardEntry
 StandardEntry (CatalogType type, SchemaCatalogEntry &schema, Catalog &catalog, string name)
 
SchemaCatalogEntryParentSchema () override
 
const SchemaCatalogEntryParentSchema () const override
 
- Public Member Functions inherited from duckdb::InCatalogEntry
 InCatalogEntry (CatalogType type, Catalog &catalog, string name)
 
CatalogParentCatalog () override
 
const CatalogParentCatalog () const override
 
void Verify (Catalog &catalog) override
 
- Public Member Functions inherited from duckdb::CatalogEntry
 CatalogEntry (CatalogType type, Catalog &catalog, string name)
 
 CatalogEntry (CatalogType type, string name, idx_t oid)
 
virtual unique_ptr< CatalogEntryAlterEntry (ClientContext &context, AlterInfo &info)
 
virtual unique_ptr< CatalogEntryAlterEntry (CatalogTransaction transaction, AlterInfo &info)
 
virtual void UndoAlter (ClientContext &context, AlterInfo &info)
 
virtual void Rollback (CatalogEntry &prev_entry)
 
virtual void OnDrop ()
 
virtual void SetAsRoot ()
 Sets the CatalogEntry as the new root entry (i.e. the newest entry)
 
void Serialize (Serializer &serializer) const
 
void SetChild (unique_ptr< CatalogEntry > child)
 
unique_ptr< CatalogEntryTakeChild ()
 
bool HasChild () const
 
bool HasParent () const
 
CatalogEntryChild ()
 
CatalogEntryParent ()
 
const CatalogEntryParent () const
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Public Attributes

LogicalType user_type
 
bind_logical_type_function_t bind_function
 
- Public Attributes inherited from duckdb::StandardEntry
SchemaCatalogEntryschema
 The schema the entry belongs to.
 
LogicalDependencyList dependencies
 The dependencies of the entry, can be empty.
 
- Public Attributes inherited from duckdb::InCatalogEntry
Catalogcatalog
 The catalog the entry belongs to.
 
- Public Attributes inherited from duckdb::CatalogEntry
idx_t oid
 The oid of the entry.
 
CatalogType type
 The type of this catalog entry.
 
optional_ptr< CatalogSetset
 Reference to the catalog set this entry is stored in.
 
string name
 The name of the entry.
 
bool deleted
 Whether or not the object is deleted.
 
bool temporary
 Whether or not the object is temporary and should not be added to the WAL.
 
bool internal
 Whether or not the entry is an internal entry (cannot be deleted, not dumped, etc)
 
atomic< transaction_ttimestamp
 Timestamp at which the catalog entry was created.
 
Value comment
 (optional) comment on this entry
 
InsertionOrderPreservingMap< string > tags
 (optional) extra data associated with this entry
 

Static Public Attributes

static constexpr const CatalogType Type = CatalogType::TYPE_ENTRY
 
static constexpr const charName = "type"
 

Additional Inherited Members

- Static Public Member Functions inherited from duckdb::CatalogEntry
static unique_ptr< CreateInfoDeserialize (Deserializer &deserializer)
 

Detailed Description

A type catalog entry.

Constructor & Destructor Documentation

◆ TypeCatalogEntry()

duckdb::TypeCatalogEntry::TypeCatalogEntry ( Catalog catalog,
SchemaCatalogEntry schema,
CreateTypeInfo info 
)

Create a TypeCatalogEntry and initialize storage for it.

21362 : StandardEntry(CatalogType::TYPE_ENTRY, schema, catalog, info.name), user_type(info.type),
21363 bind_function(info.bind_function) {
21364 this->temporary = info.temporary;
21365 this->internal = info.internal;
21366 this->dependencies = info.dependencies;
21367 this->comment = info.comment;
21368 this->tags = info.tags;
21369}
InsertionOrderPreservingMap< string > tags
(optional) extra data associated with this entry
Definition duckdb.hpp:6323
Value comment
(optional) comment on this entry
Definition duckdb.hpp:6321
bool internal
Whether or not the entry is an internal entry (cannot be deleted, not dumped, etc)
Definition duckdb.hpp:6317
bool temporary
Whether or not the object is temporary and should not be added to the WAL.
Definition duckdb.hpp:6315
Catalog & catalog
The catalog the entry belongs to.
Definition duckdb.hpp:6387
SchemaCatalogEntry & schema
The schema the entry belongs to.
Definition duckdb.hpp:28008
LogicalDependencyList dependencies
The dependencies of the entry, can be empty.
Definition duckdb.hpp:28010

Member Function Documentation

◆ GetInfo()

unique_ptr< CreateInfo > duckdb::TypeCatalogEntry::GetInfo ( ) const
overridevirtual

Reimplemented from duckdb::CatalogEntry.

21378 {
21379 auto result = make_uniq<CreateTypeInfo>();
21380 result->catalog = catalog.GetName();
21381 result->schema = schema.name;
21382 result->name = name;
21383 result->type = user_type;
21384 result->dependencies = dependencies;
21385 result->comment = comment;
21386 result->tags = tags;
21387 result->bind_function = bind_function;
21388 return std::move(result);
21389}
string name
The name of the entry.
Definition duckdb.hpp:6311
DUCKDB_API const string & GetName() const
Returns the catalog name - based on how the catalog was attached.
Definition duckdb.cpp:7165

◆ Copy()

unique_ptr< CatalogEntry > duckdb::TypeCatalogEntry::Copy ( ClientContext context) const
overridevirtual

Reimplemented from duckdb::CatalogEntry.

21371 {
21372 auto info_copy = GetInfo();
21373 auto &cast_info = info_copy->Cast<CreateTypeInfo>();
21374 auto result = make_uniq<TypeCatalogEntry>(catalog, schema, cast_info);
21375 return std::move(result);
21376}

◆ ToSQL()

string duckdb::TypeCatalogEntry::ToSQL ( ) const
overridevirtual

Convert the catalog entry to a SQL string that can be used to re-construct the catalog entry.

Reimplemented from duckdb::CatalogEntry.

21391 {
21393 ss << "CREATE TYPE ";
21395 ss << " AS ";
21396
21397 auto user_type_copy = user_type;
21398
21399 // Strip off the potential alias so ToString doesn't just output the alias
21400 user_type_copy.SetAlias("");
21401 D_ASSERT(user_type_copy.GetAlias().empty());
21402
21403 ss << user_type_copy.ToString();
21404 ss << ";";
21405 return ss.str();
21406}
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.hpp:960
Here is the call graph for this function:

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