added date_type_t, time_type_t and timestamp, ensure allocated postgres resources are released, split repository into basic_repository and repository.
This commit is contained in:
@@ -25,12 +25,12 @@ public:
|
||||
[[nodiscard]] bool is_primary_key_constraint() const;
|
||||
[[nodiscard]] bool is_foreign_key_constraint() const;
|
||||
[[nodiscard]] bool is_unique_constraint() const;
|
||||
[[nodiscard]] const std::string& ref_table_name() const;
|
||||
[[nodiscard]] const std::string& ref_column_name() const;
|
||||
[[nodiscard]] std::string ref_table_name() const;
|
||||
[[nodiscard]] std::string ref_column_name() const;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const restriction& c);
|
||||
|
||||
std::string type_string() const;
|
||||
[[nodiscard]] std::string type_string() const;
|
||||
|
||||
private:
|
||||
friend class constraint_builder;
|
||||
@@ -38,27 +38,9 @@ private:
|
||||
friend class object;
|
||||
|
||||
const class attribute& attr_;
|
||||
std::shared_ptr<object> owner_;
|
||||
std::shared_ptr<object> reference_;
|
||||
std::weak_ptr<object> owner_;
|
||||
std::weak_ptr<object> reference_;
|
||||
utils::constraints options_{utils::constraints::None};
|
||||
};
|
||||
|
||||
// class constraint_builder {
|
||||
// public:
|
||||
// constraint_builder& constraint(std::string name);
|
||||
// constraint_builder& primary_key(std::string name);
|
||||
// constraint_builder& foreign_key(std::string name);
|
||||
// constraint_builder& references(std::string table, std::string column);
|
||||
//
|
||||
// operator class restriction() const;
|
||||
//
|
||||
// private:
|
||||
// std::string constraint_name;
|
||||
// utils::constraints options_{utils::constraints::None};
|
||||
// std::string column_name;
|
||||
// };
|
||||
//
|
||||
// constraint_builder constraint(std::string name);
|
||||
|
||||
}
|
||||
#endif //MATADOR_RESTRICTION_HPP
|
||||
Reference in New Issue
Block a user