5#include <userver/engine/impl/context_accessor.hpp>
6#include <userver/storages/redis/reply_fwd.hpp>
7#include <userver/storages/redis/reply_types.hpp>
8#include <userver/storages/redis/scan_tag.hpp>
10USERVER_NAMESPACE_BEGIN
12namespace storages::
redis {
21template <
typename ReplyType>
24 virtual ~RequestDataBase() =
default;
26 virtual void Wait() = 0;
28 virtual ReplyType Get(
const std::string& request_description) = 0;
30 virtual ReplyPtr GetRaw() = 0;
32 virtual engine::
impl::ContextAccessor* TryGetContextAccessor()
noexcept = 0;
35template <ScanTag scan_tag>
38 using ReplyElem =
typename ScanReplyElem<scan_tag>::type;
40 virtual ~RequestScanDataBase() =
default;
42 void SetRequestDescription(std::string request_description) {
43 request_description_ = std::move(request_description);
46 virtual ReplyElem Get() = 0;
48 virtual ReplyElem& Current() = 0;
50 virtual bool Eof() = 0;
54 std::string request_description_;