use raw pointer of table in class column (progress, needs fixes in tests)
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user