fixed session tests
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user