implemented lazy loading for object_ptr and belongs_to

This commit is contained in:
2026-01-15 12:40:54 +01:00
parent db8e137c11
commit 7626331866
81 changed files with 1790 additions and 927 deletions
+4 -5
View File
@@ -5,12 +5,11 @@
namespace matador::sql::detail {
template<>
record *create_prototype<record>(const std::vector<object::attribute> &prototype) {
auto result = std::make_unique<record>();
record create_prototype(const std::vector<object::attribute> &prototype) {
record rec;
int index{0};
for (const auto &col: prototype) {
result->append({
rec.append({
col.name(),
col.type(),
col.attributes().options(),
@@ -18,7 +17,7 @@ record *create_prototype<record>(const std::vector<object::attribute> &prototype
index++
});
}
return result.release();
return rec;
}