#include <userver/storages/redis/command_options.hpp>
Options for HSETEX (FNX/FXX combined with EX/PX/EXAT/PXAT/KEEPTTL).
Definition at line 301 of file command_options.hpp.
Public Types | |
| enum class | Exist : std::uint8_t { kSetAlways , kSetIfNoneExist , kSetIfAllExist } |
| Existence precondition for the affected fields. More... | |
| enum class | TtlAction : std::uint8_t { kNone , kSetSeconds , kSetMilliseconds , kSetAtSeconds , kSetAtMilliseconds , kKeepTtl } |
| What TTL clause to attach to the new values. More... | |
Public Member Functions | |
| HsetexOptions & | OnlyIfNoneOfFieldsExist () & |
| Chainable modifier — FNX: write only if none of the affected fields currently exist. | |
| HsetexOptions & | OnlyIfAllFieldsExist () & |
| Chainable modifier — FXX: write only if all of the affected fields currently exist. | |
| HsetexOptions | OnlyIfNoneOfFieldsExist () && |
| FNX (rvalue overload). | |
| HsetexOptions | OnlyIfAllFieldsExist () && |
| FXX (rvalue overload). | |
Static Public Member Functions | |
| static HsetexOptions | NoTtl () |
| No TTL clause on the wire — server applies default behavior. | |
| static HsetexOptions | KeepTtl () |
| KEEPTTL — keep the existing TTL of each field if any. | |
| static HsetexOptions | Expire (std::chrono::milliseconds ttl) |
| Set TTL to a relative duration. Posted on the wire as PX (ms-precision). | |
| static HsetexOptions | ExpireAt (std::chrono::system_clock::time_point deadline) |
| Set TTL to an absolute deadline. Posted on the wire as PXAT (ms-precision). | |
Public Attributes | |
| Exist | exist {Exist::kSetAlways} |
| TtlAction | ttl_action {TtlAction::kNone} |
| std::chrono::milliseconds | ttl {0} |
|
strong |
Existence precondition for the affected fields.
Definition at line 303 of file command_options.hpp.
|
strong |
What TTL clause to attach to the new values.
Definition at line 312 of file command_options.hpp.
|
inline |
Chainable modifier — FXX: write only if all of the affected fields currently exist.
Definition at line 348 of file command_options.hpp.
|
inline |
FXX (rvalue overload).
Definition at line 358 of file command_options.hpp.
|
inline |
Chainable modifier — FNX: write only if none of the affected fields currently exist.
Definition at line 342 of file command_options.hpp.
|
inline |
FNX (rvalue overload).
Definition at line 353 of file command_options.hpp.
| Exist storages::redis::HsetexOptions::exist {Exist::kSetAlways} |
Definition at line 327 of file command_options.hpp.
| std::chrono::milliseconds storages::redis::HsetexOptions::ttl {0} |
Definition at line 329 of file command_options.hpp.
| TtlAction storages::redis::HsetexOptions::ttl_action {TtlAction::kNone} |
Definition at line 328 of file command_options.hpp.