added some additional methods to table for later use

This commit is contained in:
Sascha Kühl
2026-02-12 16:16:46 +01:00
parent 4c63322024
commit 746fd9e8d2
2 changed files with 30 additions and 0 deletions
+11
View File
@@ -27,6 +27,7 @@ public:
[[nodiscard]] const std::string& table_name() const;
[[nodiscard]] const std::string& name() const;
[[nodiscard]] std::string schema_name() const;
[[nodiscard]] const std::vector<table_column>& columns() const;
[[nodiscard]] bool has_alias() const;
@@ -37,6 +38,12 @@ public:
const table_column* operator[](const std::string& column_name) const;
static const table_column* column_by_name(const table &tab, const std::string& column_name);
[[nodiscard]] bool is_relation_table() const;
[[nodiscard]] bool has_primary_key() const;
[[nodiscard]] const std::string& join_column_name() const;
[[nodiscard]] const std::string& inverse_join_column_name() const;
protected:
static const table_column& create_column(class table& tab, const std::string& name);
@@ -50,6 +57,10 @@ private:
std::string schema_name_;
std::vector<table_column> columns_;
std::string pk_column_name_;
std::string join_column_name_;
std::string inverse_join_column_name_;
};
template<typename Type = table>