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

Abstract base class of an entry in the catalog. More...

#include <duckdb.hpp>

Inheritance diagram for duckdb::CatalogEntry:
Collaboration diagram for duckdb::CatalogEntry:

Public Member Functions

 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 unique_ptr< CatalogEntryCopy (ClientContext &context) const
 
virtual unique_ptr< CreateInfoGetInfo () const
 
virtual void SetAsRoot ()
 Sets the CatalogEntry as the new root entry (i.e. the newest entry)
 
virtual string ToSQL () const
 Convert the catalog entry to a SQL string that can be used to re-construct the catalog entry.
 
virtual CatalogParentCatalog ()
 
virtual const CatalogParentCatalog () const
 
virtual SchemaCatalogEntryParentSchema ()
 
virtual const SchemaCatalogEntryParentSchema () const
 
virtual void Verify (Catalog &catalog)
 
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
 

Static Public Member Functions

static unique_ptr< CreateInfoDeserialize (Deserializer &deserializer)
 

Public Attributes

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
 

Private Attributes

unique_ptr< CatalogEntrychild
 Child entry.
 
optional_ptr< CatalogEntryparent
 Parent entry (the node that dependents_map this node)
 

Detailed Description

Abstract base class of an entry in the catalog.

Constructor & Destructor Documentation

◆ CatalogEntry() [1/2]

duckdb::CatalogEntry::CatalogEntry ( CatalogType  type,
Catalog catalog,
string  name 
)
22037 : CatalogEntry(type, std::move(name_p), catalog.GetDatabase().GetDatabaseManager().NextOid()) {
22038}
CatalogType type
The type of this catalog entry.
Definition duckdb.hpp:6307

◆ CatalogEntry() [2/2]

duckdb::CatalogEntry::CatalogEntry ( CatalogType  type,
string  name,
idx_t  oid 
)
22032 : oid(oid), type(type), set(nullptr), name(std::move(name_p)), deleted(false), temporary(false), internal(false),
22033 parent(nullptr) {
22034}
idx_t oid
The oid of the entry.
Definition duckdb.hpp:6305
string name
The name of the entry.
Definition duckdb.hpp:6311
optional_ptr< CatalogSet > set
Reference to the catalog set this entry is stored in.
Definition duckdb.hpp:6309
bool internal
Whether or not the entry is an internal entry (cannot be deleted, not dumped, etc)
Definition duckdb.hpp:6317
bool deleted
Whether or not the object is deleted.
Definition duckdb.hpp:6313
optional_ptr< CatalogEntry > parent
Parent entry (the node that dependents_map this node)
Definition duckdb.hpp:6329
bool temporary
Whether or not the object is temporary and should not be added to the WAL.
Definition duckdb.hpp:6315

◆ ~CatalogEntry()

duckdb::CatalogEntry::~CatalogEntry ( )
virtual
22040 {
22041}

Member Function Documentation

◆ AlterEntry() [1/2]

unique_ptr< CatalogEntry > duckdb::CatalogEntry::AlterEntry ( ClientContext context,
AlterInfo info 
)
virtual
22047 {
22048 throw InternalException("Unsupported alter type for catalog entry!");
22049}

◆ AlterEntry() [2/2]

unique_ptr< CatalogEntry > duckdb::CatalogEntry::AlterEntry ( CatalogTransaction  transaction,
AlterInfo info 
)
virtual
22051 {
22052 if (!transaction.context) {
22053 throw InternalException("Cannot AlterEntry without client context");
22054 }
22055 return AlterEntry(*transaction.context, info);
22056}

◆ UndoAlter()

void duckdb::CatalogEntry::UndoAlter ( ClientContext context,
AlterInfo info 
)
virtual
22058 {
22059}

◆ Rollback()

void duckdb::CatalogEntry::Rollback ( CatalogEntry prev_entry)
virtual
22131 {
22132}

◆ OnDrop()

void duckdb::CatalogEntry::OnDrop ( )
virtual
22134 {
22135}

◆ Copy()

unique_ptr< CatalogEntry > duckdb::CatalogEntry::Copy ( ClientContext context) const
virtual
22061 {
22062 throw InternalException("Unsupported copy type for catalog entry!");
22063}

◆ GetInfo()

unique_ptr< CreateInfo > duckdb::CatalogEntry::GetInfo ( ) const
virtual

Reimplemented in duckdb::IndexCatalogEntry.

22065 {
22066 throw InternalException("Unsupported type for CatalogEntry::GetInfo!");
22067}

◆ SetAsRoot()

void duckdb::CatalogEntry::SetAsRoot ( )
virtual

Sets the CatalogEntry as the new root entry (i.e. the newest entry)

Reimplemented in duckdb::DuckTableEntry.

22043 {
22044}

◆ ToSQL()

string duckdb::CatalogEntry::ToSQL ( ) const
virtual

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

Reimplemented in duckdb::IndexCatalogEntry, duckdb::MacroCatalogEntry, duckdb::TableCatalogEntry, duckdb::TypeCatalogEntry, duckdb::ViewCatalogEntry, duckdb::SequenceCatalogEntry, and duckdb::SchemaCatalogEntry.

22069 {
22070 throw InternalException({{"catalog_type", CatalogTypeToString(type)}}, "Unsupported catalog type for ToSQL()");
22071}

◆ ParentCatalog() [1/2]

Catalog & duckdb::CatalogEntry::ParentCatalog ( )
virtual
22102 {
22103 throw InternalException("CatalogEntry::ParentCatalog called on catalog entry without catalog");
22104}

◆ ParentCatalog() [2/2]

const Catalog & duckdb::CatalogEntry::ParentCatalog ( ) const
virtual
22106 {
22107 throw InternalException("CatalogEntry::ParentCatalog called on catalog entry without catalog");
22108}

◆ ParentSchema() [1/2]

SchemaCatalogEntry & duckdb::CatalogEntry::ParentSchema ( )
virtual
22110 {
22111 throw InternalException("CatalogEntry::ParentSchema called on catalog entry without schema");
22112}

◆ ParentSchema() [2/2]

const SchemaCatalogEntry & duckdb::CatalogEntry::ParentSchema ( ) const
virtual
22114 {
22115 throw InternalException("CatalogEntry::ParentSchema called on catalog entry without schema");
22116}

◆ Verify()

void duckdb::CatalogEntry::Verify ( Catalog catalog)
virtual
22128 {
22129}

◆ Serialize()

void duckdb::CatalogEntry::Serialize ( Serializer serializer) const
22119 {
22120 const auto info = GetInfo();
22121 info->Serialize(serializer);
22122}

◆ Deserialize()

unique_ptr< CreateInfo > duckdb::CatalogEntry::Deserialize ( Deserializer deserializer)
static
22124 {
22125 return CreateInfo::Deserialize(deserializer);
22126}

◆ SetChild()

void duckdb::CatalogEntry::SetChild ( unique_ptr< CatalogEntry child)
22073 {
22074 child = std::move(child_p);
22075 if (child) {
22076 child->parent = this;
22077 }
22078}
unique_ptr< CatalogEntry > child
Child entry.
Definition duckdb.hpp:6327

◆ TakeChild()

unique_ptr< CatalogEntry > duckdb::CatalogEntry::TakeChild ( )
22080 {
22081 if (child) {
22082 child->parent = nullptr;
22083 }
22084 return std::move(child);
22085}

◆ HasChild()

bool duckdb::CatalogEntry::HasChild ( ) const
22087 {
22088 return child != nullptr;
22089}

◆ HasParent()

bool duckdb::CatalogEntry::HasParent ( ) const
22090 {
22091 return parent != nullptr;
22092}

◆ Child()

CatalogEntry & duckdb::CatalogEntry::Child ( )
22094 {
22095 return *child;
22096}

◆ Parent()

CatalogEntry & duckdb::CatalogEntry::Parent ( )
22098 {
22099 return *parent;
22100}

◆ Cast() [1/2]

template<class TARGET >
TARGET & duckdb::CatalogEntry::Cast ( )
inline
6370 {
6371 DynamicCastCheck<TARGET>(this);
6372 return reinterpret_cast<TARGET &>(*this);
6373 }

◆ Cast() [2/2]

template<class TARGET >
const TARGET & duckdb::CatalogEntry::Cast ( ) const
inline
6375 {
6376 DynamicCastCheck<TARGET>(this);
6377 return reinterpret_cast<const TARGET &>(*this);
6378 }

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