object generating progress
This commit is contained in:
@@ -5,20 +5,24 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace matador::object {
|
||||
basic_object_info::basic_object_info(std::shared_ptr<repository_node> node,
|
||||
const std::vector<attribute> &attributes,
|
||||
utils::identifier &&pk,
|
||||
const std::shared_ptr<attribute> &pk_as_fk_column)
|
||||
: node_(std::move(node))
|
||||
, attributes_(attributes)
|
||||
, identifier_(std::move(pk))
|
||||
, pk_as_fk_column_(pk_as_fk_column) {
|
||||
}
|
||||
// basic_object_info::basic_object_info(std::shared_ptr<repository_node> node,
|
||||
// const std::vector<attribute> &attributes,
|
||||
// utils::identifier &&pk,
|
||||
// const std::shared_ptr<attribute> &pk_as_fk_column)
|
||||
// : node_(std::move(node))
|
||||
// , attributes_(attributes)
|
||||
// , identifier_(std::move(pk))
|
||||
// , pk_as_fk_column_(pk_as_fk_column) {
|
||||
// }
|
||||
//
|
||||
// basic_object_info::basic_object_info(std::shared_ptr<repository_node> node,
|
||||
// const std::vector<attribute> &attributes)
|
||||
// : node_(std::move(node))
|
||||
// , attributes_(attributes) {}
|
||||
|
||||
basic_object_info::basic_object_info(std::shared_ptr<repository_node> node,
|
||||
const std::vector<attribute> &attributes)
|
||||
: node_(std::move(node))
|
||||
, attributes_(attributes) {}
|
||||
basic_object_info::basic_object_info(std::shared_ptr<repository_node> node, std::unique_ptr<object>&& obj)
|
||||
: object_(std::move(obj))
|
||||
, node_(std::move(node)) {}
|
||||
|
||||
std::type_index basic_object_info::type_index() const {
|
||||
return node_->type_index();
|
||||
@@ -29,19 +33,23 @@ std::string basic_object_info::name() const {
|
||||
}
|
||||
|
||||
const std::vector<attribute>& basic_object_info::attributes() const {
|
||||
return attributes_;
|
||||
return object_->attributes();
|
||||
}
|
||||
|
||||
std::shared_ptr<attribute> basic_object_info::reference_column() const {
|
||||
return pk_as_fk_column_;
|
||||
}
|
||||
// std::shared_ptr<attribute> basic_object_info::reference_column() const {
|
||||
// return pk_as_fk_column_;
|
||||
// }
|
||||
|
||||
bool basic_object_info::has_primary_key() const {
|
||||
return identifier_.has_value();
|
||||
return object_->has_primary_key();
|
||||
}
|
||||
|
||||
const utils::identifier& basic_object_info::primary_key() const {
|
||||
return identifier_.value();
|
||||
return object_->primary_key();
|
||||
}
|
||||
|
||||
attribute* basic_object_info::primary_key_attribute() const {
|
||||
return object_->primary_key_attribute();
|
||||
}
|
||||
|
||||
basic_object_info::endpoint_iterator basic_object_info::register_relation_endpoint(const std::type_index &type, const std::shared_ptr<relation_endpoint> &endpoint) {
|
||||
|
||||
Reference in New Issue
Block a user