forked from duckdb/duckdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create catalog entries for dependency management
- Loading branch information
Showing
8 changed files
with
186 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "duckdb/catalog/catalog_entry/dependency_catalog_entry.hpp" | ||
|
||
namespace duckdb { | ||
|
||
DependencyCatalogEntry::DependencyCatalogEntry(Catalog &catalog, const string &name) | ||
: InCatalogEntry(CatalogType::DEPENDENCY_ENTRY, catalog, name) { | ||
} | ||
|
||
DependencyCatalogEntry::~DependencyCatalogEntry() { | ||
} | ||
|
||
} // namespace duckdb |
20 changes: 20 additions & 0 deletions
20
src/catalog/catalog_entry/dependency_set_catalog_entry.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "duckdb/catalog/catalog_entry/dependency_set_catalog_entry.hpp" | ||
|
||
namespace duckdb { | ||
|
||
DependencySetCatalogEntry::DependencySetCatalogEntry(Catalog &catalog, const string &name) | ||
: InCatalogEntry(CatalogType::DEPENDENCY_SET, catalog, name), dependencies(catalog), dependents(catalog) { | ||
} | ||
|
||
CatalogSet &DependencySetCatalogEntry::Dependencies() { | ||
return dependencies; | ||
} | ||
|
||
CatalogSet &DependencySetCatalogEntry::Dependents() { | ||
return dependents; | ||
} | ||
|
||
DependencySetCatalogEntry::~DependencySetCatalogEntry() { | ||
} | ||
|
||
} // namespace duckdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/include/duckdb/catalog/catalog_entry/dependency_catalog_entry.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//===----------------------------------------------------------------------===// | ||
// DuckDB | ||
// | ||
// duckdb/catalog/catalog_entry.hpp | ||
// | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "duckdb/common/common.hpp" | ||
#include "duckdb/common/enums/catalog_type.hpp" | ||
#include "duckdb/common/exception.hpp" | ||
#include "duckdb/common/atomic.hpp" | ||
#include "duckdb/common/optional_ptr.hpp" | ||
#include "duckdb/catalog/catalog_entry.hpp" | ||
#include "duckdb/catalog/catalog_set.hpp" | ||
#include <memory> | ||
|
||
namespace duckdb { | ||
|
||
//! Resembles a connection between an object and the CatalogEntry that can be retrieved from the Catalog using the | ||
//! identifiers listed here | ||
class DependencyCatalogEntry : public InCatalogEntry { | ||
public: | ||
DependencyCatalogEntry(Catalog &catalog, const string &name); | ||
~DependencyCatalogEntry() override; | ||
|
||
private: | ||
string name; | ||
string schema; | ||
CatalogType type; | ||
// DependencyType dependency_type; | ||
}; | ||
|
||
} // namespace duckdb |
37 changes: 37 additions & 0 deletions
37
src/include/duckdb/catalog/catalog_entry/dependency_set_catalog_entry.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//===----------------------------------------------------------------------===// | ||
// DuckDB | ||
// | ||
// duckdb/catalog/catalog_entry.hpp | ||
// | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "duckdb/common/common.hpp" | ||
#include "duckdb/common/enums/catalog_type.hpp" | ||
#include "duckdb/common/exception.hpp" | ||
#include "duckdb/common/atomic.hpp" | ||
#include "duckdb/common/optional_ptr.hpp" | ||
#include "duckdb/catalog/catalog_entry.hpp" | ||
#include "duckdb/catalog/catalog_set.hpp" | ||
#include <memory> | ||
|
||
namespace duckdb { | ||
|
||
class DependencySetCatalogEntry : public InCatalogEntry { | ||
public: | ||
DependencySetCatalogEntry(Catalog &catalog, const string &name); | ||
~DependencySetCatalogEntry() override; | ||
|
||
public: | ||
CatalogSet &Dependencies(); | ||
CatalogSet &Dependents(); | ||
|
||
private: | ||
string name; | ||
CatalogSet dependencies; | ||
CatalogSet dependents; | ||
}; | ||
|
||
} // namespace duckdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters