refactored result that an overload for void doesn't need to exist

This commit is contained in:
2026-07-30 12:33:24 +02:00
parent 78b30f9742
commit c880728093
7 changed files with 127 additions and 95 deletions
@@ -30,7 +30,7 @@ utils::result<sql::query_result<sql::record>, utils::error> fetchable_query::fet
auto ctx = compiler.build(*context_, exec.dialect(), std::nullopt);
ctx.resolver = exec.resolver();
return exec.fetch(ctx)
.and_then([](auto &&res) {
.and_then([](auto &&res) -> utils::result<sql::query_result<sql::record>, utils::error> {
const auto prototype = res->prototype();
return utils::ok(sql::query_result<sql::record>(std::forward<decltype(res)>(res), prototype));
});