7#include <userver/storages/redis/impl/base.hpp>
13using Longitude = utils::StrongTypedef<
struct LongitudeTag,
double>;
14using Latitude = utils::StrongTypedef<
struct LatitudeTag,
double>;
15using BoxWidth = utils::StrongTypedef<
struct BoxWidthTag,
double>;
16using BoxHeight = utils::StrongTypedef<
struct BoxHeightTag,
double>;
25 enum class Sort { kNone, kAsc, kDesc };
26 enum class Unit { kM, kKm, kMi, kFt };
29 bool withcoord =
false;
30 bool withdist =
false;
31 bool withhash =
false;
33 Sort sort = Sort::kNone;
37 enum class Sort { kNone, kAsc, kDesc };
38 enum class Unit { kM, kKm, kMi, kFt };
41 bool withcoord =
false;
42 bool withdist =
false;
43 bool withhash =
false;
45 Sort sort = Sort::kNone;
49 enum class Exist { kSetAlways, kSetIfNotExist, kSetIfExist };
53 Exist exist = Exist::kSetAlways;
57 enum class Exist { kAddAlways, kAddIfNotExist, kAddIfExist };
58 enum class ReturnValue { kAddedCount, kChangedCount };
60 ZaddOptions() =
default;
61 ZaddOptions(Exist exist, ReturnValue return_value = ReturnValue::kAddedCount)
62 : exist(exist), return_value(return_value) {}
63 ZaddOptions(ReturnValue return_value, Exist exist = Exist::kAddAlways)
64 : exist(exist), return_value(return_value) {}
66 Exist exist = Exist::kAddAlways;
67 ReturnValue return_value = ReturnValue::kAddedCount;
76 std::optional<ScanCursor> cursor;
77 std::optional<std::string> pattern;
78 std::optional<size_t> count;
82 bool withscores =
false;
86 std::optional<size_t> offset;
87 std::optional<size_t> count;
95void PutArg(CmdArgs::CmdArgsArray& args_,
GeoaddArg arg);
97void PutArg(CmdArgs::CmdArgsArray& args_, std::vector<GeoaddArg> arg);
103void PutArg(CmdArgs::CmdArgsArray& args_,
const SetOptions& arg);
105void PutArg(CmdArgs::CmdArgsArray& args_,
const ZaddOptions& arg);
107void PutArg(CmdArgs::CmdArgsArray& args_,
const ScanOptions& arg);
109void PutArg(CmdArgs::CmdArgsArray& args_,
const ScoreOptions& arg);
111void PutArg(CmdArgs::CmdArgsArray& args_,
const RangeOptions& arg);