progress on relation completer

This commit is contained in:
Sascha Kühl
2025-07-04 16:05:00 +02:00
parent 9c7628b6cb
commit 8f2d07518f
10 changed files with 152 additions and 63 deletions
+10 -2
View File
@@ -14,13 +14,15 @@ public:
object_info(const std::shared_ptr<schema_node>& node,
std::shared_ptr<attribute_definition> &&ref_column)
: basic_object_info(node, typeid(Type), {}, std::move(ref_column), {}) {
: basic_object_info(node, typeid(Type), {}, std::move(ref_column), {})
, creator_([]{return std::make_unique<Type>(); }){
}
object_info(const std::shared_ptr<schema_node>& node,
utils::identifier &&pk,
std::shared_ptr<attribute_definition> &&ref_column,
object_definition &&definition)
: basic_object_info(node, typeid(Type), std::move(pk), std::move(ref_column), std::move(definition)) {
: basic_object_info(node, typeid(Type), std::move(pk), std::move(ref_column), std::move(definition))
, creator_([]{return std::make_unique<Type>(); }){
}
object_info(const std::shared_ptr<schema_node>& node,
utils::identifier &&pk,
@@ -30,6 +32,12 @@ public:
: basic_object_info(node, typeid(Type), std::move(pk), std::move(ref_column), std::move(definition))
, creator_(std::move(creator)){
}
object_info(const std::shared_ptr<schema_node>& node,
object_definition &&definition,
create_func&& creator)
: basic_object_info(node, typeid(Type), std::move(definition))
, creator_(std::move(creator)){
}
const Type &prototype() const { return prototype_; }
std::unique_ptr<Type> create() const { return creator_(); }