fixed restriction and constraint class to use size_t

This commit is contained in:
2026-06-03 16:36:51 +02:00
parent 87bd2f8b89
commit 705d361aaa
10 changed files with 29 additions and 22 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ void object_generator::create_pk_constraint(const std::string &name) const {
if (pk_attr == std::end(object_->attributes_)) {
return;
}
restriction pk_constraint(*pk_attr);
restriction pk_constraint(pk_attr->index());
pk_constraint.options_ |= utils::constraints::PrimaryKey;
pk_constraint.owner_ = object_;
object_->constraints_.emplace_back(std::move(pk_constraint));
@@ -41,7 +41,7 @@ void object_generator::create_unique_constraint(const std::string &name) const {
if (pk_attr == std::end(object_->attributes_)) {
return;
}
restriction pk_constraint(*pk_attr);
restriction pk_constraint(pk_attr->index());
pk_constraint.options_ |= utils::constraints::Unique;
pk_constraint.owner_ = object_;
}