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:
2026-01-06 15:43:20 +01:00
parent f07a360da2
commit 0c6b5a0a93
60 changed files with 1132 additions and 1225 deletions
+3 -5
View File
@@ -24,15 +24,13 @@ static const utils::enum_mapper<relation_type> relation_type_enum({
class relation_endpoint {
public:
relation_endpoint(std::string field_name, relation_type type, const std::shared_ptr<repository_node>& node);
relation_endpoint(std::string field_name, relation_type type, repository_node& node);
[[nodiscard]] std::string field_name() const;
[[nodiscard]] relation_type type() const;
[[nodiscard]] std::string type_name() const;
[[nodiscard]] const repository_node& node() const;
[[nodiscard]] std::shared_ptr<repository_node> node_ptr() const;
[[nodiscard]] bool is_has_one() const;
[[nodiscard]] bool is_has_many() const;
[[nodiscard]] bool is_belongs_to() const;
@@ -48,8 +46,8 @@ private:
std::string field_name_;
relation_type type_;
std::shared_ptr<repository_node> node_;
std::shared_ptr<relation_endpoint> foreign_endpoint_;
repository_node *node_{nullptr};
std::weak_ptr<relation_endpoint> foreign_endpoint_;
};
}