![]() |
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.
|
The Catalog object represents the catalog of the database. More...
#include <duckdb.hpp>


Static Public Member Functions | |
| static DUCKDB_API Catalog & | GetSystemCatalog (ClientContext &context) |
| Get the SystemCatalog from the ClientContext. | |
| static DUCKDB_API Catalog & | GetSystemCatalog (DatabaseInstance &db) |
| Get the SystemCatalog from the DatabaseInstance. | |
| static DUCKDB_API Catalog & | GetCatalog (ClientContext &context, const string &catalog_name) |
| Get the specified Catalog from the ClientContext. | |
| static DUCKDB_API Catalog & | GetCatalog (CatalogEntryRetriever &retriever, const string &catalog_name) |
| Get the specified Catalog from the ClientContext. | |
| static DUCKDB_API Catalog & | GetCatalog (DatabaseInstance &db, const string &catalog_name) |
| Get the specified Catalog from the DatabaseInstance. | |
| static DUCKDB_API optional_ptr< Catalog > | GetCatalogEntry (ClientContext &context, const string &catalog_name) |
| Gets the specified Catalog from the database if it exists. | |
| static DUCKDB_API optional_ptr< Catalog > | GetCatalogEntry (CatalogEntryRetriever &retriever, const string &catalog_name) |
| Gets the specified Catalog from the database if it exists. | |
| static DUCKDB_API Catalog & | GetCatalog (AttachedDatabase &db) |
| Get the specific Catalog from the AttachedDatabase. | |
| static DUCKDB_API optional_ptr< CatalogEntry > | CreateCollation (CatalogTransaction transaction, SchemaCatalogEntry &schema, CreateCollationInfo &info) |
| Creates a collation in the catalog. | |
| static DUCKDB_API optional_ptr< CatalogEntry > | CreateCoordinateSystem (CatalogTransaction transaction, SchemaCatalogEntry &schema, CreateCoordinateSystemInfo &info) |
| Creates a coordinate system in the catalog. | |
| static DUCKDB_API SchemaCatalogEntry & | GetSchema (ClientContext &context, const string &catalog_name, const EntryLookupInfo &schema_lookup) |
| static DUCKDB_API optional_ptr< SchemaCatalogEntry > | GetSchema (ClientContext &context, const string &catalog_name, const EntryLookupInfo &schema_lookup, OnEntryNotFound if_not_found) |
| static DUCKDB_API SchemaCatalogEntry & | GetSchema (ClientContext &context, const string &catalog_name, const string &schema) |
| static DUCKDB_API optional_ptr< SchemaCatalogEntry > | GetSchema (ClientContext &context, const string &catalog_name, const string &schema, OnEntryNotFound if_not_found) |
| static DUCKDB_API optional_ptr< SchemaCatalogEntry > | GetSchema (CatalogEntryRetriever &retriever, const string &catalog_name, const EntryLookupInfo &schema_lookup, OnEntryNotFound if_not_found) |
| static DUCKDB_API optional_ptr< CatalogEntry > | GetEntry (ClientContext &context, const string &catalog, const string &schema, const EntryLookupInfo &lookup_info, OnEntryNotFound if_not_found) |
| static DUCKDB_API optional_ptr< CatalogEntry > | GetEntry (CatalogEntryRetriever &retriever, const string &catalog, const string &schema, const EntryLookupInfo &lookup_info, OnEntryNotFound if_not_found) |
| static DUCKDB_API CatalogEntry & | GetEntry (ClientContext &context, const string &catalog, const string &schema, const EntryLookupInfo &lookup_info) |
| static CatalogEntry & | GetEntry (ClientContext &context, CatalogType catalog_type, const string &catalog_name, const string &schema_name, const string &name) |
| template<class T > | |
| static optional_ptr< T > | GetEntry (ClientContext &context, const string &catalog_name, const string &schema_name, const string &name, OnEntryNotFound if_not_found, QueryErrorContext error_context=QueryErrorContext()) |
| template<class T > | |
| static T & | GetEntry (ClientContext &context, const string &catalog_name, const string &schema_name, const string &name, QueryErrorContext error_context=QueryErrorContext()) |
| static DUCKDB_API vector< reference< SchemaCatalogEntry > > | GetSchemas (ClientContext &context, const string &catalog_name) |
| static DUCKDB_API vector< reference< SchemaCatalogEntry > > | GetSchemas (CatalogEntryRetriever &retriever, const string &catalog_name) |
| static DUCKDB_API vector< reference< SchemaCatalogEntry > > | GetAllSchemas (ClientContext &context) |
| static vector< reference< CatalogEntry > > | GetAllEntries (ClientContext &context, CatalogType catalog_type) |
| static CatalogException | UnrecognizedConfigurationError (ClientContext &context, const string &name) |
| static String | AutoloadExtensionByConfigName (ClientContext &context, const String &configuration_name) |
Autoload the extension required for configuration_name or throw a CatalogException. | |
| static bool | AutoLoadExtensionByCatalogEntry (DatabaseInstance &db, CatalogType type, const string &entry_name) |
Autoload the extension required for function_name or throw a CatalogException. | |
| static DUCKDB_API bool | TryAutoLoad (ClientContext &context, const string &extension_name) noexcept |
Protected Attributes | |
| AttachedDatabase & | db |
| Reference to the database. | |
| string | default_table |
(optionally) a default table to query for SELECT * FROM <catalog_name>; | |
| string | default_table_schema |
Private Member Functions | |
| virtual CatalogEntryLookup | TryLookupEntryInternal (CatalogTransaction transaction, const string &schema, const EntryLookupInfo &lookup_info) |
| Lookup an entry in the schema, returning a lookup with the entry and schema if they exist. | |
| CatalogEntryLookup | TryLookupEntry (CatalogEntryRetriever &retriever, const string &schema, const EntryLookupInfo &lookup_info, OnEntryNotFound if_not_found) |
| virtual void | DropSchema (ClientContext &context, DropInfo &info)=0 |
The Catalog object represents the catalog of the database.
|
explicit |
|
virtual |
|
static |
Get the SystemCatalog from the ClientContext.


|
static |
Get the specified Catalog from the ClientContext.


|
static |
Get the specified Catalog from the ClientContext.

|
static |
Gets the specified Catalog from the database if it exists.


|
static |
Gets the specified Catalog from the database if it exists.

| AttachedDatabase & duckdb::Catalog::GetAttached | ( | ) |
| const AttachedDatabase & duckdb::Catalog::GetAttached | ( | ) | const |
| DatabaseInstance & duckdb::Catalog::GetDatabase | ( | ) |
|
inlinevirtual |
|
virtual |
|
virtual |
| bool duckdb::Catalog::IsSystemCatalog | ( | ) | const |
| bool duckdb::Catalog::IsTemporaryCatalog | ( | ) | const |
|
inlinevirtual |
Returns a version number that uniquely characterizes the current catalog snapshot. If there are transaction-local changes, the version returned is >= TRANSACTION_START, o.w. it is a simple number starting at 0 that is incremented at each commit that has had catalog changes. If the catalog does not support versioning, no index is returned.
Reimplemented in duckdb::DuckCatalog.
| const string & duckdb::Catalog::GetName | ( | ) | const |
Returns the catalog name - based on how the catalog was attached.

| idx_t duckdb::Catalog::GetOid | ( | ) |
| CatalogTransaction duckdb::Catalog::GetCatalogTransaction | ( | ClientContext & | context | ) |
|
pure virtual |
Creates a schema in the catalog.
Implemented in duckdb::DuckCatalog.
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateSchema | ( | ClientContext & | context, |
| CreateSchemaInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTable | ( | CatalogTransaction | transaction, |
| BoundCreateTableInfo & | info | ||
| ) |
Creates a table in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTable | ( | ClientContext & | context, |
| BoundCreateTableInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTable | ( | ClientContext & | context, |
| unique_ptr< CreateTableInfo > | info | ||
| ) |
Creates a table in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTableFunction | ( | CatalogTransaction | transaction, |
| CreateTableFunctionInfo & | info | ||
| ) |
Create a table function in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTableFunction | ( | ClientContext & | context, |
| CreateTableFunctionInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTableFunction | ( | ClientContext & | context, |
| optional_ptr< CreateTableFunctionInfo > | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateCopyFunction | ( | CatalogTransaction | transaction, |
| CreateCopyFunctionInfo & | info | ||
| ) |
Create a copy function in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateCopyFunction | ( | ClientContext & | context, |
| CreateCopyFunctionInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreatePragmaFunction | ( | CatalogTransaction | transaction, |
| CreatePragmaFunctionInfo & | info | ||
| ) |
Create a pragma function in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreatePragmaFunction | ( | ClientContext & | context, |
| CreatePragmaFunctionInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateFunction | ( | CatalogTransaction | transaction, |
| CreateFunctionInfo & | info | ||
| ) |
Create a scalar or aggregate function in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateFunction | ( | ClientContext & | context, |
| CreateFunctionInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateView | ( | CatalogTransaction | transaction, |
| CreateViewInfo & | info | ||
| ) |
Creates a table in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateView | ( | ClientContext & | context, |
| CreateViewInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateSequence | ( | CatalogTransaction | transaction, |
| CreateSequenceInfo & | info | ||
| ) |
Creates a sequence in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateSequence | ( | ClientContext & | context, |
| CreateSequenceInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateType | ( | CatalogTransaction | transaction, |
| CreateTypeInfo & | info | ||
| ) |
Creates a Enum in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateType | ( | ClientContext & | context, |
| CreateTypeInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateCollation | ( | CatalogTransaction | transaction, |
| CreateCollationInfo & | info | ||
| ) |
Creates a collation in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateCollation | ( | ClientContext & | context, |
| CreateCollationInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateCoordinateSystem | ( | CatalogTransaction | transaction, |
| CreateCoordinateSystemInfo & | info | ||
| ) |
Creates a coordinate system in the catalog.


| optional_ptr< CatalogEntry > duckdb::Catalog::CreateCoordinateSystem | ( | ClientContext & | context, |
| CreateCoordinateSystemInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateIndex | ( | CatalogTransaction | transaction, |
| CreateIndexInfo & | info | ||
| ) |
Creates an index in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateIndex | ( | ClientContext & | context, |
| CreateIndexInfo & | info | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTable | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| BoundCreateTableInfo & | info | ||
| ) |
Creates a table in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateTableFunction | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| CreateTableFunctionInfo & | info | ||
| ) |
Create a table function in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateCopyFunction | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| CreateCopyFunctionInfo & | info | ||
| ) |
Create a copy function in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreatePragmaFunction | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| CreatePragmaFunctionInfo & | info | ||
| ) |
Create a pragma function in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateFunction | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| CreateFunctionInfo & | info | ||
| ) |
Create a scalar or aggregate function in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateView | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| CreateViewInfo & | info | ||
| ) |
Creates a view in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateSequence | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| CreateSequenceInfo & | info | ||
| ) |
Creates a table in the catalog.

| optional_ptr< CatalogEntry > duckdb::Catalog::CreateType | ( | CatalogTransaction | transaction, |
| SchemaCatalogEntry & | schema, | ||
| CreateTypeInfo & | info | ||
| ) |
Creates a enum in the catalog.

|
static |
Creates a collation in the catalog.

|
static |
Creates a coordinate system in the catalog.

| void duckdb::Catalog::DropEntry | ( | ClientContext & | context, |
| DropInfo & | info | ||
| ) |
Drops an entry from the catalog.

| SchemaCatalogEntry & duckdb::Catalog::GetSchema | ( | ClientContext & | context, |
| const EntryLookupInfo & | schema_lookup | ||
| ) |
Returns the schema object with the specified name, or throws an exception if it does not exist.


| optional_ptr< SchemaCatalogEntry > duckdb::Catalog::GetSchema | ( | ClientContext & | context, |
| const EntryLookupInfo & | schema_lookup, | ||
| OnEntryNotFound | if_not_found | ||
| ) |
|
virtual |
Overloadable method for giving warnings on ambiguous naming id.tab due to a database and schema with name id.

| SchemaCatalogEntry & duckdb::Catalog::GetSchema | ( | ClientContext & | context, |
| const string & | schema | ||
| ) |
| SchemaCatalogEntry & duckdb::Catalog::GetSchema | ( | CatalogTransaction | transaction, |
| const string & | schema | ||
| ) |
| SchemaCatalogEntry & duckdb::Catalog::GetSchema | ( | CatalogTransaction | transaction, |
| const EntryLookupInfo & | schema_lookup | ||
| ) |
|
static |
| optional_ptr< SchemaCatalogEntry > duckdb::Catalog::GetSchema | ( | ClientContext & | context, |
| const string & | schema, | ||
| OnEntryNotFound | if_not_found | ||
| ) |
| optional_ptr< SchemaCatalogEntry > duckdb::Catalog::GetSchema | ( | CatalogTransaction | transaction, |
| const string & | schema, | ||
| OnEntryNotFound | if_not_found | ||
| ) |
|
static |
|
static |
|
static |
|
static |
|
pure virtual |
Scans all the schemas in the system one-by-one, invoking the callback for each entry.
Implemented in duckdb::DuckCatalog.
| optional_ptr< CatalogEntry > duckdb::Catalog::GetEntry | ( | ClientContext & | context, |
| const string & | schema, | ||
| const EntryLookupInfo & | lookup_info, | ||
| OnEntryNotFound | if_not_found | ||
| ) |
Gets the "schema.name" entry of the specified type, if entry does not exist behavior depends on OnEntryNotFound.


| optional_ptr< CatalogEntry > duckdb::Catalog::GetEntry | ( | ClientContext & | context, |
| CatalogType | catalog_type, | ||
| const string & | schema, | ||
| const string & | name, | ||
| OnEntryNotFound | if_not_found | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::GetEntry | ( | CatalogEntryRetriever & | retriever, |
| const string & | schema, | ||
| const EntryLookupInfo & | lookup_info, | ||
| OnEntryNotFound | if_not_found | ||
| ) |
| CatalogEntry & duckdb::Catalog::GetEntry | ( | ClientContext & | context, |
| const string & | schema, | ||
| const EntryLookupInfo & | lookup_info | ||
| ) |
|
static |
Gets the "catalog.schema.name" entry of the specified type, if entry does not exist behavior depends on OnEntryNotFound

|
static |
|
static |
|
inline |
|
inline |
|
static |
| CatalogEntry & duckdb::Catalog::GetEntry | ( | ClientContext & | context, |
| CatalogType | catalog_type, | ||
| const string & | schema_name, | ||
| const string & | name | ||
| ) |
| optional_ptr< CatalogEntry > duckdb::Catalog::AddFunction | ( | ClientContext & | context, |
| CreateFunctionInfo & | info | ||
| ) |
Append a scalar or aggregate function to the catalog.

| void duckdb::Catalog::Alter | ( | CatalogTransaction | transaction, |
| AlterInfo & | info | ||
| ) |
Alter an existing entry in the catalog.
| void duckdb::Catalog::Alter | ( | ClientContext & | context, |
| AlterInfo & | info | ||
| ) |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
inlinevirtual |
Whether or not this catalog should search a specific type with the standard priority.
|
virtual |
Returns the default schema of the catalog.
| bool duckdb::Catalog::HasDefaultTable | ( | ) | const |
Whether this catalog has a default table. Catalogs with a default table can be queries by their catalog name.
The default table is used for SELECT * FROM <catalog_name>; FIXME: these should be virtual methods
| string duckdb::Catalog::GetDefaultTable | ( | ) | const |
| string duckdb::Catalog::GetDefaultTableSchema | ( | ) | const |
|
virtual |
Returns the dependency manager of this catalog - if the catalog has anye.
Reimplemented in duckdb::DuckCatalog.
|
virtual |
Whether attaching a catalog with the given path and attach options would be considered a conflict.
|
inlinestatic |
|
inlinestatic |
| vector< reference< SchemaCatalogEntry > > duckdb::Catalog::GetSchemas | ( | ClientContext & | context | ) |
|
static |
|
static |
|
static |
|
static |
|
virtual |
|
static |
|
static |
Autoload the extension required for configuration_name or throw a CatalogException.

|
static |
Autoload the extension required for function_name or throw a CatalogException.

|
staticnoexcept |
|
virtual |
Called when the catalog is detached.
| CatalogEntryLookup duckdb::Catalog::LookupEntry | ( | CatalogEntryRetriever & | retriever, |
| const string & | schema, | ||
| const EntryLookupInfo & | lookup_info, | ||
| OnEntryNotFound | if_not_found | ||
| ) |
Lookup an entry using TryLookupEntry, throws if entry not found and if_not_found == THROW_EXCEPTION.


|
privatevirtual |
Lookup an entry in the schema, returning a lookup with the entry and schema if they exist.

|
private |
Calls LookupEntryInternal on the schema, trying other schemas if the schema is invalid. Sets CatalogEntryLookup->error depending on if_not_found when no entry is found


|
staticprivate |
|
staticprivate |
|
staticprivate |
Looks for a Catalog with a DefaultTable that matches the lookup.

|
staticprivate |
Return an exception with did-you-mean suggestion.


|
staticprivate |
Return the close entry name, the distance and the belonging schema.
