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::SchemaCatalogEntry Class Referenceabstract

A schema in the catalog. More...

#include <duckdb.hpp>

Inheritance diagram for duckdb::SchemaCatalogEntry:
Collaboration diagram for duckdb::SchemaCatalogEntry:

Public Member Functions

 SchemaCatalogEntry (Catalog &catalog, CreateSchemaInfo &info)
 
unique_ptr< CreateInfoGetInfo () const override
 
virtual void Scan (ClientContext &context, CatalogType type, const std::function< void(CatalogEntry &)> &callback)=0
 Scan the specified catalog set, invoking the callback method for every entry.
 
virtual void Scan (CatalogType type, const std::function< void(CatalogEntry &)> &callback)=0
 Scan the specified catalog set, invoking the callback method for every committed entry.
 
string ToSQL () const override
 Convert the catalog entry to a SQL string that can be used to re-construct the catalog entry.
 
virtual optional_ptr< CatalogEntryCreateIndex (CatalogTransaction transaction, CreateIndexInfo &info, TableCatalogEntry &table)=0
 Creates an index with the given name in the schema.
 
optional_ptr< CatalogEntryCreateIndex (ClientContext &context, CreateIndexInfo &info, TableCatalogEntry &table)
 
virtual optional_ptr< CatalogEntryCreateFunction (CatalogTransaction transaction, CreateFunctionInfo &info)=0
 Create a scalar or aggregate function within the given schema.
 
virtual optional_ptr< CatalogEntryCreateTable (CatalogTransaction transaction, BoundCreateTableInfo &info)=0
 Creates a table with the given name in the schema.
 
virtual optional_ptr< CatalogEntryCreateView (CatalogTransaction transaction, CreateViewInfo &info)=0
 Creates a view with the given name in the schema.
 
virtual optional_ptr< CatalogEntryCreateSequence (CatalogTransaction transaction, CreateSequenceInfo &info)=0
 Creates a sequence with the given name in the schema.
 
virtual optional_ptr< CatalogEntryCreateTableFunction (CatalogTransaction transaction, CreateTableFunctionInfo &info)=0
 Create a table function within the given schema.
 
virtual optional_ptr< CatalogEntryCreateCopyFunction (CatalogTransaction transaction, CreateCopyFunctionInfo &info)=0
 Create a copy function within the given schema.
 
virtual optional_ptr< CatalogEntryCreatePragmaFunction (CatalogTransaction transaction, CreatePragmaFunctionInfo &info)=0
 Create a pragma function within the given schema.
 
virtual optional_ptr< CatalogEntryCreateCollation (CatalogTransaction transaction, CreateCollationInfo &info)=0
 Create a collation within the given schema.
 
virtual optional_ptr< CatalogEntryCreateCoordinateSystem (CatalogTransaction transaction, CreateCoordinateSystemInfo &info)
 Create a coordiante system within the given schema.
 
virtual optional_ptr< CatalogEntryCreateType (CatalogTransaction transaction, CreateTypeInfo &info)=0
 Create a enum within the given schema.
 
virtual DUCKDB_API optional_ptr< CatalogEntryLookupEntry (CatalogTransaction transaction, const EntryLookupInfo &lookup_info)=0
 Lookup an entry in the schema.
 
virtual DUCKDB_API CatalogSet::EntryLookup LookupEntryDetailed (CatalogTransaction transaction, const EntryLookupInfo &lookup_info)
 
virtual DUCKDB_API SimilarCatalogEntry GetSimilarEntry (CatalogTransaction transaction, const EntryLookupInfo &lookup_info)
 
DUCKDB_API optional_ptr< CatalogEntryGetEntry (CatalogTransaction transaction, CatalogType type, const string &name)
 
virtual void DropEntry (ClientContext &context, DropInfo &info)=0
 Drops an entry from the schema.
 
virtual void Alter (CatalogTransaction transaction, AlterInfo &info)=0
 Alters a catalog entry.
 
CatalogTransaction GetCatalogTransaction (ClientContext &context)
 
- 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 unique_ptr< CatalogEntryCopy (ClientContext &context) const
 
virtual void SetAsRoot ()
 Sets the CatalogEntry as the new root entry (i.e. the newest entry)
 
virtual SchemaCatalogEntryParentSchema ()
 
virtual const SchemaCatalogEntryParentSchema () const
 
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 Attributes

static constexpr const CatalogType Type = CatalogType::SCHEMA_ENTRY
 
static constexpr const charName = "schema"
 

Additional Inherited Members

- Static Public Member Functions inherited from duckdb::CatalogEntry
static unique_ptr< CreateInfoDeserialize (Deserializer &deserializer)
 
- 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
 

Detailed Description

A schema in the catalog.

Constructor & Destructor Documentation

◆ SchemaCatalogEntry()

duckdb::SchemaCatalogEntry::SchemaCatalogEntry ( Catalog catalog,
CreateSchemaInfo info 
)
14692 : InCatalogEntry(CatalogType::SCHEMA_ENTRY, catalog, info.schema) {
14693 this->internal = info.internal;
14694 this->comment = info.comment;
14695 this->tags = info.tags;
14696}
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
Catalog & catalog
The catalog the entry belongs to.
Definition duckdb.hpp:6387

Member Function Documentation

◆ GetInfo()

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

Reimplemented from duckdb::CatalogEntry.

14740 {
14741 auto result = make_uniq<CreateSchemaInfo>();
14742 result->schema = name;
14743 result->comment = comment;
14744 result->tags = tags;
14745 return std::move(result);
14746}
string name
The name of the entry.
Definition duckdb.hpp:6311

◆ Scan() [1/2]

virtual void duckdb::SchemaCatalogEntry::Scan ( ClientContext context,
CatalogType  type,
const std::function< void(CatalogEntry &)> &  callback 
)
pure virtual

Scan the specified catalog set, invoking the callback method for every entry.

Implemented in duckdb::DuckSchemaEntry.

◆ Scan() [2/2]

virtual void duckdb::SchemaCatalogEntry::Scan ( CatalogType  type,
const std::function< void(CatalogEntry &)> &  callback 
)
pure virtual

Scan the specified catalog set, invoking the callback method for every committed entry.

Implemented in duckdb::DuckSchemaEntry.

◆ ToSQL()

string duckdb::SchemaCatalogEntry::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.

14748 {
14749 auto create_schema_info = GetInfo();
14750 return create_schema_info->ToString();
14751}

◆ CreateIndex() [1/2]

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateIndex ( CatalogTransaction  transaction,
CreateIndexInfo info,
TableCatalogEntry table 
)
pure virtual

Creates an index with the given name in the schema.

Implemented in duckdb::DuckSchemaEntry.

◆ CreateIndex() [2/2]

optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateIndex ( ClientContext context,
CreateIndexInfo info,
TableCatalogEntry table 
)
14703 {
14704 return CreateIndex(GetCatalogTransaction(context), info, table);
14705}
virtual optional_ptr< CatalogEntry > CreateIndex(CatalogTransaction transaction, CreateIndexInfo &info, TableCatalogEntry &table)=0
Creates an index with the given name in the schema.

◆ CreateFunction()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateFunction ( CatalogTransaction  transaction,
CreateFunctionInfo info 
)
pure virtual

Create a scalar or aggregate function within the given schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreateTable()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateTable ( CatalogTransaction  transaction,
BoundCreateTableInfo info 
)
pure virtual

Creates a table with the given name in the schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreateView()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateView ( CatalogTransaction  transaction,
CreateViewInfo info 
)
pure virtual

Creates a view with the given name in the schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreateSequence()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateSequence ( CatalogTransaction  transaction,
CreateSequenceInfo info 
)
pure virtual

Creates a sequence with the given name in the schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreateTableFunction()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateTableFunction ( CatalogTransaction  transaction,
CreateTableFunctionInfo info 
)
pure virtual

Create a table function within the given schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreateCopyFunction()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateCopyFunction ( CatalogTransaction  transaction,
CreateCopyFunctionInfo info 
)
pure virtual

Create a copy function within the given schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreatePragmaFunction()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreatePragmaFunction ( CatalogTransaction  transaction,
CreatePragmaFunctionInfo info 
)
pure virtual

Create a pragma function within the given schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreateCollation()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateCollation ( CatalogTransaction  transaction,
CreateCollationInfo info 
)
pure virtual

Create a collation within the given schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ CreateCoordinateSystem()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateCoordinateSystem ( CatalogTransaction  transaction,
CreateCoordinateSystemInfo info 
)
inlinevirtual

Create a coordiante system within the given schema.

Reimplemented in duckdb::DuckSchemaEntry.

29362 {
29363 throw NotImplementedException("Coordinate systems are not supported in schema '%s'", name);
29364 }
Here is the caller graph for this function:

◆ CreateType()

virtual optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::CreateType ( CatalogTransaction  transaction,
CreateTypeInfo info 
)
pure virtual

Create a enum within the given schema.

Implemented in duckdb::DuckSchemaEntry.

Here is the caller graph for this function:

◆ LookupEntry()

virtual DUCKDB_API optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::LookupEntry ( CatalogTransaction  transaction,
const EntryLookupInfo lookup_info 
)
pure virtual

Lookup an entry in the schema.

Implemented in duckdb::DuckSchemaEntry.

◆ LookupEntryDetailed()

CatalogSet::EntryLookup duckdb::SchemaCatalogEntry::LookupEntryDetailed ( CatalogTransaction  transaction,
const EntryLookupInfo lookup_info 
)
virtual

This should not be used, it's only implemented to not put the burden of implementing it on every derived class of SchemaCatalogEntry

Reimplemented in duckdb::DuckSchemaEntry.

14729 {
14730 CatalogSet::EntryLookup result;
14731 result.result = LookupEntry(transaction, lookup_info);
14732 if (!result.result) {
14733 result.reason = CatalogSet::EntryLookup::FailureReason::DELETED;
14734 } else {
14735 result.reason = CatalogSet::EntryLookup::FailureReason::SUCCESS;
14736 }
14737 return result;
14738}
virtual DUCKDB_API optional_ptr< CatalogEntry > LookupEntry(CatalogTransaction transaction, const EntryLookupInfo &lookup_info)=0
Lookup an entry in the schema.

◆ GetSimilarEntry()

SimilarCatalogEntry duckdb::SchemaCatalogEntry::GetSimilarEntry ( CatalogTransaction  transaction,
const EntryLookupInfo lookup_info 
)
virtual
14708 {
14709 SimilarCatalogEntry result;
14710 Scan(transaction.GetContext(), lookup_info.GetCatalogType(), [&](CatalogEntry &entry) {
14711 auto entry_score = StringUtil::SimilarityRating(entry.name, lookup_info.GetEntryName());
14712 if (entry_score > result.score) {
14713 result.score = entry_score;
14714 result.name = entry.name;
14715 }
14716 });
14717 return result;
14718}
virtual void Scan(ClientContext &context, CatalogType type, const std::function< void(CatalogEntry &)> &callback)=0
Scan the specified catalog set, invoking the callback method for every entry.

◆ GetEntry()

optional_ptr< CatalogEntry > duckdb::SchemaCatalogEntry::GetEntry ( CatalogTransaction  transaction,
CatalogType  type,
const string &  name 
)
14721 {
14722 EntryLookupInfo lookup_info(type, name);
14723 return LookupEntry(transaction, lookup_info);
14724}
CatalogType type
The type of this catalog entry.
Definition duckdb.hpp:6307

◆ DropEntry()

virtual void duckdb::SchemaCatalogEntry::DropEntry ( ClientContext context,
DropInfo info 
)
pure virtual

Drops an entry from the schema.

Implemented in duckdb::DuckSchemaEntry.

◆ Alter()

virtual void duckdb::SchemaCatalogEntry::Alter ( CatalogTransaction  transaction,
AlterInfo info 
)
pure virtual

Alters a catalog entry.

Implemented in duckdb::DuckSchemaEntry.

◆ GetCatalogTransaction()

CatalogTransaction duckdb::SchemaCatalogEntry::GetCatalogTransaction ( ClientContext context)
14698 {
14699 return CatalogTransaction(catalog, context);
14700}

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