//===----------------------------------------------------------------------===// // DuckDB // // duckdb/catalog/catalog_entry/dschema_catalog_entry.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "duckdb/catalog/catalog_entry/schema_catalog_entry.hpp" namespace duckdb { //! A schema in the catalog class DuckSchemaEntry : public SchemaCatalogEntry { public: DuckSchemaEntry(Catalog &catalog, string name, bool is_internal); private: //! The catalog set holding the tables CatalogSet tables; //! The catalog set holding the indexes CatalogSet indexes; //! The catalog set holding the table functions CatalogSet table_functions; //! The catalog set holding the copy functions CatalogSet copy_functions; //! The catalog set holding the pragma functions CatalogSet pragma_functions; //! The catalog set holding the scalar and aggregate functions CatalogSet functions; //! The catalog set holding the sequences CatalogSet sequences; //! The catalog set holding the collations CatalogSet collations; //! The catalog set holding the types CatalogSet types; public: optional_ptr AddEntry(CatalogTransaction transaction, unique_ptr entry, OnCreateConflict on_conflict); optional_ptr AddEntryInternal(CatalogTransaction transaction, unique_ptr entry, OnCreateConflict on_conflict, DependencyList dependencies); optional_ptr CreateTable(CatalogTransaction transaction, BoundCreateTableInfo &info) override; optional_ptr CreateFunction(CatalogTransaction transaction, CreateFunctionInfo &info) override; optional_ptr CreateIndex(ClientContext &context, CreateIndexInfo &info, TableCatalogEntry &table) override; optional_ptr CreateView(CatalogTransaction transaction, CreateViewInfo &info) override; optional_ptr CreateSequence(CatalogTransaction transaction, CreateSequenceInfo &info) override; optional_ptr CreateTableFunction(CatalogTransaction transaction, CreateTableFunctionInfo &info) override; optional_ptr CreateCopyFunction(CatalogTransaction transaction, CreateCopyFunctionInfo &info) override; optional_ptr CreatePragmaFunction(CatalogTransaction transaction, CreatePragmaFunctionInfo &info) override; optional_ptr CreateCollation(CatalogTransaction transaction, CreateCollationInfo &info) override; optional_ptr CreateType(CatalogTransaction transaction, CreateTypeInfo &info) override; void Alter(ClientContext &context, AlterInfo &info) override; void Scan(ClientContext &context, CatalogType type, const std::function &callback) override; void Scan(CatalogType type, const std::function &callback) override; void DropEntry(ClientContext &context, DropInfo &info) override; optional_ptr GetEntry(CatalogTransaction transaction, CatalogType type, const string &name) override; SimilarCatalogEntry GetSimilarEntry(CatalogTransaction transaction, CatalogType type, const string &name) override; void Verify(Catalog &catalog) override; private: //! Get the catalog set for the specified type CatalogSet &GetCatalogSet(CatalogType type); }; } // namespace duckdb