added belongs to many eager test loading via sql join (progress)

This commit is contained in:
2025-02-17 22:16:03 +01:00
parent 5109659882
commit 901d9c071a
5 changed files with 64 additions and 15 deletions
@@ -89,11 +89,6 @@ utils::result<std::unique_ptr<sql::query_result_impl>, utils::error> postgres_co
return utils::failure(make_error(sql::error_code::FETCH_FAILED, res, conn_, "Failed to fetch", context.sql));
}
// const auto is_unknown = std::all_of( context.prototype.begin(), context.prototype.end(), [](const object::attribute_definition &a) {return a.is_null();} );
// if (!is_unknown) {
// return utils::ok(std::make_unique<sql::query_result_impl>(std::make_unique<postgres_result_reader>(res), context.prototype));
// }
std::vector<object::attribute_definition> prototype = context.prototype;
const int num_col = PQnfields(res);