refactored result that an overload for void doesn't need to exist
This commit is contained in:
@@ -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));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user