1#include "duckdb/catalog/catalog_entry.hpp"
2
3#include "duckdb/catalog/catalog.hpp"
4
5namespace duckdb {
6
7CatalogEntry::CatalogEntry(CatalogType type, string name_p, idx_t oid)
8 : oid(oid), type(type), set(nullptr), name(std::move(name_p)), deleted(false), temporary(false), internal(false),
9 parent(nullptr) {
10}
11
12CatalogEntry::CatalogEntry(CatalogType type, Catalog &catalog, string name_p)
13 : CatalogEntry(type, std::move(name_p), catalog.ModifyCatalog()) {
14}
15
16CatalogEntry::~CatalogEntry() {
17}
18
19void CatalogEntry::SetAsRoot() {
20}
21
22// LCOV_EXCL_START
23unique_ptr<CatalogEntry> CatalogEntry::AlterEntry(ClientContext &context, AlterInfo &info) {
24 throw InternalException("Unsupported alter type for catalog entry!");
25}
26
27void CatalogEntry::UndoAlter(ClientContext &context, AlterInfo &info) {
28}
29
30unique_ptr<CatalogEntry> CatalogEntry::Copy(ClientContext &context) const {
31 throw InternalException("Unsupported copy type for catalog entry!");
32}
33
34string CatalogEntry::ToSQL() const {
35 throw InternalException("Unsupported catalog type for ToSQL()");
36}
37
38Catalog &CatalogEntry::ParentCatalog() {
39 throw InternalException("CatalogEntry::ParentCatalog called on catalog entry without catalog");
40}
41
42SchemaCatalogEntry &CatalogEntry::ParentSchema() {
43 throw InternalException("CatalogEntry::ParentSchema called on catalog entry without schema");
44}
45// LCOV_EXCL_STOP
46
47void CatalogEntry::Verify(Catalog &catalog_p) {
48}
49
50InCatalogEntry::InCatalogEntry(CatalogType type, Catalog &catalog, string name)
51 : CatalogEntry(type, catalog, std::move(name)), catalog(catalog) {
52}
53
54InCatalogEntry::~InCatalogEntry() {
55}
56
57void InCatalogEntry::Verify(Catalog &catalog_p) {
58 D_ASSERT(&catalog_p == &catalog);
59}
60} // namespace duckdb
61