47 lines
1.4 KiB
C++
47 lines
1.4 KiB
C++
#include "matador/object/basic_object_info.hpp"
|
|
|
|
#include "matador/object/schema_node.hpp"
|
|
|
|
#include <algorithm>
|
|
|
|
namespace matador::object {
|
|
basic_object_info::basic_object_info(std::shared_ptr<schema_node> node,
|
|
const std::type_index type_index,
|
|
utils::identifier &&pk,
|
|
std::shared_ptr<attribute_definition> &&pk_column,
|
|
object_definition &&definition)
|
|
: node_(std::move(node))
|
|
, type_index_(type_index)
|
|
, definition_(std::move(definition))
|
|
, identifier_(std::move(pk))
|
|
, pk_column_(std::move(pk_column)) {
|
|
}
|
|
|
|
basic_object_info::basic_object_info(std::shared_ptr<schema_node> node,
|
|
const std::type_index type_index,
|
|
utils::identifier &&pk,
|
|
std::shared_ptr<attribute_definition> &&pk_column)
|
|
: node_(std::move(node))
|
|
, type_index_(type_index)
|
|
, identifier_(std::move(pk))
|
|
, pk_column_(std::move(pk_column)) {
|
|
}
|
|
|
|
std::type_index basic_object_info::type_index() const {
|
|
return type_index_;
|
|
}
|
|
|
|
std::string basic_object_info::name() const {
|
|
return node_->name();
|
|
}
|
|
|
|
const object_definition &basic_object_info::definition() const {
|
|
return definition_;
|
|
}
|
|
|
|
std::shared_ptr<attribute_definition> basic_object_info::reference_column() const {
|
|
return pk_column_;
|
|
}
|
|
|
|
} // namespace matador::object
|