14struct BoundExtraCreateCatalogEntryInfo;
17namespace transaction {
32 :
CatalogEntry{catalogType, std::move(name)}, set{set}, tableID{tableID}, nextPID{0},
43 void setComment(std::string newComment) { comment = std::move(newComment); }
50 alterInfo = std::make_unique<binder::BoundAlterInfo>(alterInfo_.copy());
65 std::unique_ptr<parser::ParsedExpression> defaultExpr);
76 virtual std::unique_ptr<TableCatalogEntry>
copy()
const = 0;
98 return std::hash<common::table_id_t>{}(entry->
getTableID());
109 std::unordered_set<TableCatalogEntry*, TableCatalogEntryHasher, TableCatalogEntryEquality>;
#define KUZU_API
Definition api.h:25
#define KU_UNREACHABLE
Definition assert.h:28
Definition catalog_entry.h:18
Definition catalog_set.h:24
Definition table_catalog_entry.h:24
std::string comment
Definition table_catalog_entry.h:89
void renameProperty(common::property_id_t propertyID, const std::string &newName)
common::property_id_t getPropertyID(const std::string &propertyName) const
common::column_id_t nextColumnID
Definition table_catalog_entry.h:91
std::string getComment() const
Definition table_catalog_entry.h:42
const Property * getProperty(common::property_id_t propertyID) const
uint32_t getPropertyPos(common::property_id_t propertyID) const
std::unique_ptr< TableCatalogEntry > alter(const binder::BoundAlterInfo &alterInfo)
virtual common::column_id_t getColumnID(common::property_id_t propertyID) const
static std::unique_ptr< TableCatalogEntry > deserialize(common::Deserializer &deserializer, CatalogEntryType type)
void serialize(common::Serializer &serializer) const override
virtual common::TableType getTableType() const =0
virtual std::unique_ptr< binder::BoundExtraCreateCatalogEntryInfo > getBoundExtraCreateInfo(transaction::Transaction *transaction) const =0
TableCatalogEntry(CatalogSet *set, CatalogEntryType catalogType, std::string name, common::table_id_t tableID)
Definition table_catalog_entry.h:30
virtual bool isParent(common::table_id_t)
Definition table_catalog_entry.h:44
void addProperty(std::string propertyName, common::LogicalType dataType, std::unique_ptr< parser::ParsedExpression > defaultExpr)
TableCatalogEntry()=default
void setComment(std::string newComment)
Definition table_catalog_entry.h:43
const std::vector< Property > & getPropertiesRef() const
Definition table_catalog_entry.h:57
std::vector< Property > & getPropertiesUnsafe()
Definition table_catalog_entry.h:58
virtual std::unique_ptr< TableCatalogEntry > copy() const =0
uint32_t getNumProperties() const
Definition table_catalog_entry.h:56
std::unique_ptr< binder::BoundAlterInfo > alterInfo
Definition table_catalog_entry.h:93
binder::BoundCreateTableInfo getBoundCreateTableInfo(transaction::Transaction *transaction) const
TableCatalogEntry & operator=(const TableCatalogEntry &)=delete
virtual function::TableFunction getScanFunction()
Definition table_catalog_entry.h:46
common::table_id_t tableID
Definition table_catalog_entry.h:88
common::property_id_t nextPID
Definition table_catalog_entry.h:90
CatalogSet * set
Definition table_catalog_entry.h:87
common::table_id_t getTableID() const
Definition table_catalog_entry.h:41
void dropProperty(common::property_id_t propertyID)
void copyFrom(const CatalogEntry &other) override
bool containProperty(const std::string &propertyName) const
void setAlterInfo(const binder::BoundAlterInfo &alterInfo_)
Definition table_catalog_entry.h:49
binder::BoundAlterInfo * getAlterInfo() const
Definition table_catalog_entry.h:47
void resetAlterInfo()
Definition table_catalog_entry.h:48
std::vector< Property > properties
Definition table_catalog_entry.h:92
Definition deserializer.h:15
Definition serializer.h:15
Definition transaction.h:28
std::unordered_set< TableCatalogEntry *, TableCatalogEntryHasher, TableCatalogEntryEquality > table_catalog_entry_set_t
Definition table_catalog_entry.h:108
CatalogEntryType
Definition catalog_entry_type.h:9
property_id_t column_id_t
Definition types.h:36
uint32_t property_id_t
Definition types.h:34
uint64_t table_id_t
Definition internal_id_t.h:14
TableType
Definition table_type.h:10
Definition alter_type.h:5
Definition bound_alter_info.h:25
Definition bound_create_table_info.h:35
Definition table_catalog_entry.h:102
bool operator()(TableCatalogEntry *left, TableCatalogEntry *right) const
Definition table_catalog_entry.h:103
Definition table_catalog_entry.h:96
std::size_t operator()(TableCatalogEntry *entry) const
Definition table_catalog_entry.h:97
Definition table_functions.h:78