fixed session tests

This commit is contained in:
Sascha Kühl
2025-10-08 16:03:00 +02:00
parent cb0f6322f4
commit 463647ba59
9 changed files with 144 additions and 91 deletions
+4 -1
View File
@@ -108,7 +108,10 @@ utils::result<sql::query_result<sql::record>, utils::error> session::fetch_all(c
if (!res) {
return utils::failure(res.err());
}
return utils::ok(sql::query_result<sql::record>{std::move(*res)});
const auto prototype = res.value()->prototype();
return utils::ok(sql::query_result<sql::record>{std::move(*res), [prototype] {
return sql::detail::create_prototype<sql::record>(prototype);
}});
}
utils::result<size_t, utils::error> session::execute(const std::string &sql) const {