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 -7
View File
@@ -3,10 +3,10 @@
#include "matador/object/repository_node.hpp"
namespace matador::object {
relation_endpoint::relation_endpoint(std::string field_name, const relation_type type, const std::shared_ptr<repository_node> &node)
relation_endpoint::relation_endpoint(std::string field_name, const relation_type type, repository_node &node)
: field_name_(std::move(field_name))
, type_(type)
, node_(node) {
, node_(&node) {
}
std::string relation_endpoint::field_name() const {
@@ -25,10 +25,6 @@ const repository_node &relation_endpoint::node() const {
return *node_;
}
std::shared_ptr<repository_node> relation_endpoint::node_ptr() const {
return node_;
}
bool relation_endpoint::is_has_one() const {
return type_ == relation_type::HasOne;
}
@@ -42,7 +38,7 @@ bool relation_endpoint::is_belongs_to() const {
}
std::shared_ptr<relation_endpoint> relation_endpoint::foreign_endpoint() const {
return foreign_endpoint_;
return foreign_endpoint_.lock();
}
void relation_endpoint::link_foreign_endpoint( const std::shared_ptr<relation_endpoint>& endpoint ) {