3#include <userver/storages/redis/parse_reply.hpp>
4#include <userver/storages/redis/reply.hpp>
5#include <userver/storages/redis/request.hpp>
9namespace storages::
redis {
11template <
typename ScriptResult,
typename ReplyType = ScriptResult>
12class [[nodiscard]] RequestEval final {
14 explicit RequestEval(RequestEvalCommon&& request) : request_(std::move(request)) {}
16 void Wait() { request_.Wait(); }
18 void IgnoreResult()
const { request_.IgnoreResult(); }
20 ReplyType Get(
const std::string& request_description = {}) {
21 return ParseReply<ScriptResult, ReplyType>(request_.GetRaw(), request_description);
26 engine::impl::ContextAccessor* TryGetContextAccessor()
noexcept {
return request_.TryGetContextAccessor(); }
30 RequestEvalCommon request_;