fixed core- and orm-tests. postgres-tests needs some work
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define OBJECT_INFO_HPP
|
||||
|
||||
#include "matador/object/basic_object_info.hpp"
|
||||
#include "matador/object/object_definition.hpp"
|
||||
// #include "matador/object/object_definition.hpp"
|
||||
|
||||
namespace matador::object {
|
||||
class repository_node;
|
||||
@@ -12,32 +12,37 @@ class object_info final : public basic_object_info {
|
||||
public:
|
||||
using create_func = std::function<std::unique_ptr<Type>()>;
|
||||
|
||||
// object_info(const std::shared_ptr<repository_node>& node,
|
||||
// const std::shared_ptr<attribute_definition> &ref_column)
|
||||
// : basic_object_info(node, {}, ref_column, {})
|
||||
// , creator_([]{return std::make_unique<Type>(); }){
|
||||
// }
|
||||
// object_info(const std::shared_ptr<repository_node>& node,
|
||||
// utils::identifier &&pk,
|
||||
// const std::shared_ptr<attribute_definition> &ref_column,
|
||||
// object_definition &&definition)
|
||||
// : basic_object_info(node, std::move(pk), ref_column, std::move(definition))
|
||||
// , creator_([]{return std::make_unique<Type>(); }){
|
||||
// }
|
||||
object_info(const std::shared_ptr<repository_node>& node,
|
||||
const std::shared_ptr<attribute_definition> &ref_column)
|
||||
: basic_object_info(node, {}, ref_column, {})
|
||||
, creator_([]{return std::make_unique<Type>(); }){
|
||||
}
|
||||
object_info(const std::shared_ptr<repository_node>& node,
|
||||
const std::vector<attribute_definition> &attributes,
|
||||
utils::identifier &&pk,
|
||||
const std::shared_ptr<attribute_definition> &ref_column,
|
||||
object_definition &&definition)
|
||||
: basic_object_info(node, std::move(pk), ref_column, std::move(definition))
|
||||
, creator_([]{return std::make_unique<Type>(); }){
|
||||
}
|
||||
object_info(const std::shared_ptr<repository_node>& node,
|
||||
utils::identifier &&pk,
|
||||
const std::shared_ptr<attribute_definition> &ref_column,
|
||||
object_definition &&definition,
|
||||
// object_definition &&definition,
|
||||
create_func&& creator)
|
||||
: basic_object_info(node, std::move(pk), ref_column, std::move(definition))
|
||||
: basic_object_info(node, attributes, std::move(pk), ref_column/*, std::move(definition)*/)
|
||||
, creator_(std::move(creator)){
|
||||
}
|
||||
object_info(const std::shared_ptr<repository_node>& node,
|
||||
object_definition &&definition,
|
||||
const std::vector<attribute_definition> &attributes,
|
||||
// object_definition &&definition,
|
||||
create_func&& creator)
|
||||
: basic_object_info(node, std::move(definition))
|
||||
: basic_object_info(node, attributes)
|
||||
, creator_(std::move(creator)){
|
||||
}
|
||||
explicit object_info(const std::shared_ptr<repository_node>& node)
|
||||
: basic_object_info(node, {}) {
|
||||
}
|
||||
|
||||
const Type &prototype() const { return prototype_; }
|
||||
std::unique_ptr<Type> create() const { return creator_(); }
|
||||
|
||||
Reference in New Issue
Block a user