relation_completer progress

This commit is contained in:
Sascha Kühl
2025-06-30 16:01:21 +02:00
parent 3add45dfdf
commit 5a7ab5d4d0
5 changed files with 146 additions and 26 deletions
+15
View File
@@ -27,6 +27,13 @@ basic_object_info::basic_object_info(std::shared_ptr<schema_node> node,
, pk_column_(std::move(pk_column)) {
}
basic_object_info::basic_object_info(std::shared_ptr<schema_node> node,
const std::type_index type_index,
object_definition &&definition)
: node_(std::move(node))
, type_index_(type_index)
, definition_(std::move(definition)) {}
std::type_index basic_object_info::type_index() const {
return type_index_;
}
@@ -43,6 +50,14 @@ std::shared_ptr<attribute_definition> basic_object_info::reference_column() cons
return pk_column_;
}
bool basic_object_info::has_primary_key() const {
return identifier_.has_value();
}
const utils::identifier& basic_object_info::primary_key() const {
return identifier_.value();
}
void basic_object_info::register_relation_endpoint(const std::type_index &type, const relation_endpoint &endpoint) {
relation_endpoints_.insert(std::make_pair(type, endpoint));
}