use raw pointer of table in class column (progress, needs fixes in tests)

This commit is contained in:
Sascha Kühl
2025-12-15 17:31:43 +01:00
parent 9418f28348
commit 4a19322ef8
5 changed files with 27 additions and 30 deletions
+4 -5
View File
@@ -19,8 +19,7 @@ public:
column(const char *name, const std::string& as = ""); // NOLINT(*-explicit-constructor)
column(std::string name, std::string as = ""); // NOLINT(*-explicit-constructor)
column(sql::sql_function_t func, std::string name);
// column(const class table &tab, std::string name, std::string as = "");
column(const std::shared_ptr<table> &t, std::string name, std::string as = "");
column(const class table* tab, std::string name, std::string as = "");
[[nodiscard]] bool equals(const column &x) const;
@@ -36,14 +35,14 @@ public:
[[nodiscard]] sql::sql_function_t function() const;
[[nodiscard]] bool has_alias() const;
[[nodiscard]] std::shared_ptr<class table> table() const;
void table(const std::shared_ptr<query::table>& t);
[[nodiscard]] const class table* table() const;
void table(const query::table* t);
// ReSharper disable once CppNonExplicitConversionOperator
operator const std::string&() const; // NOLINT(*-explicit-constructor)
private:
std::shared_ptr<query::table> table_;
const query::table* table_{nullptr};
std::string name_;
std::string alias_;
utils::basic_type type_{utils::basic_type::Unknown};
+1 -1
View File
@@ -10,7 +10,7 @@
namespace matador::query {
struct join_data {
std::shared_ptr<table> join_table;
table* join_table{nullptr};
std::unique_ptr<abstract_criteria> condition;
};