removed name member from restriction and changed attribute member to a reference
This commit is contained in:
@@ -17,11 +17,9 @@ class object;
|
||||
|
||||
class restriction {
|
||||
public:
|
||||
restriction() = default;
|
||||
explicit restriction(std::string name);
|
||||
explicit restriction(const class attribute& attr);
|
||||
|
||||
[[nodiscard]] std::string name() const;
|
||||
[[nodiscard]] const class attribute* attribute() const;
|
||||
[[nodiscard]] const class attribute& attribute() const;
|
||||
[[nodiscard]] std::string column_name() const;
|
||||
[[nodiscard]] std::shared_ptr<object> owner() const;
|
||||
[[nodiscard]] bool is_primary_key_constraint() const;
|
||||
@@ -39,8 +37,7 @@ private:
|
||||
friend class object_generator;
|
||||
friend class object;
|
||||
|
||||
std::string name_;
|
||||
std::variant<class attribute*, std::string> attr_;
|
||||
const class attribute& attr_;
|
||||
std::shared_ptr<object> owner_;
|
||||
std::shared_ptr<object> reference_;
|
||||
utils::constraints options_{utils::constraints::None};
|
||||
|
||||
Reference in New Issue
Block a user