fixed restriction and constraint class to use size_t
This commit is contained in:
@@ -4,16 +4,23 @@
|
||||
#include "matador/object/object.hpp"
|
||||
|
||||
namespace matador::object {
|
||||
restriction::restriction(const class attribute& attr)
|
||||
: attr_(attr) {}
|
||||
restriction::restriction(const size_t attr_index)
|
||||
: index_(attr_index) {}
|
||||
|
||||
const class attribute& restriction::attribute() const {
|
||||
return attr_;
|
||||
size_t restriction::attribute_index() const {
|
||||
return index_;
|
||||
}
|
||||
|
||||
std::string restriction::column_name() const {
|
||||
return attr_.name();
|
||||
const auto o = owner_.lock();
|
||||
return o ? o->attributes().at(index_).name() : "";
|
||||
}
|
||||
|
||||
utils::constraints restriction::options() const {
|
||||
const auto o = owner_.lock();
|
||||
return o ? o->attributes().at(index_).attributes().options() : utils::constraints::None;
|
||||
}
|
||||
|
||||
std::shared_ptr<object> restriction::owner() const {
|
||||
return owner_.lock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user