#include <userver/storages/redis/command_options.hpp>
A key condition for optimistic transaction execution with Valkey 9.2 or newer.
Definition at line 27 of file command_options.hpp.
Public Types | |
| enum class | Type { kIfEq , kIfNe , kNx , kXx } |
| The comparison performed before executing the queued commands. More... | |
Public Member Functions | |
| Type | GetType () const |
| Returns the comparison to perform. | |
| const std::string & | GetKey () const |
| Returns the key to check. | |
| const std::string & | GetValue () const |
| Returns the comparison value for IfEq and IfNe, or an empty string for Nx and Xx. | |
Static Public Member Functions | |
| static ExecCondition | IfEq (std::string key, std::string value) |
| Creates a string equality condition; see Type::kIfEq. | |
| static ExecCondition | IfNe (std::string key, std::string value) |
| Creates a string inequality condition; see Type::kIfNe. | |
| static ExecCondition | Nx (std::string key) |
| Creates a key absence condition; see Type::kNx. | |
| static ExecCondition | Xx (std::string key) |
| Creates a key existence condition; see Type::kXx. | |
|
strong |
The comparison performed before executing the queued commands.
Definition at line 30 of file command_options.hpp.
|
inline |
Returns the key to check.
Definition at line 53 of file command_options.hpp.
|
inline |
Returns the comparison to perform.
Definition at line 51 of file command_options.hpp.
|
inline |
Returns the comparison value for IfEq and IfNe, or an empty string for Nx and Xx.
Definition at line 55 of file command_options.hpp.