object generation progress

This commit is contained in:
2025-12-01 22:03:07 +01:00
parent 422df82b7c
commit c156ab5e74
10 changed files with 62 additions and 77 deletions
+3 -1
View File
@@ -2,6 +2,8 @@
#include "matador/object/repository.hpp"
#include <algorithm>
namespace matador::object {
object_generator::object_generator( const repository& repo, std::unique_ptr<object>&& object )
: repo_(repo)
@@ -47,7 +49,7 @@ void object_generator::create_unique_constraint(const std::string& name) const {
pk_constraint.owner_ = object_.get();
}
std::vector<attribute>::iterator object_generator::find_attribute_by_name(const std::string& name) const {
std::list<attribute>::iterator object_generator::find_attribute_by_name(const std::string& name) const {
return std::find_if(std::begin(object_->attributes_), std::end(object_->attributes_), [&name](const attribute& elem) {
return elem.name() == name;
});