userver: storages::redis::ReplyData Class Reference
Loading...
Searching...
No Matches
storages::redis::ReplyData Class Referencefinal

Detailed Description

Definition at line 20 of file reply.hpp.

Classes

class  KeyValues
 
class  MovableKeyValues
 

Public Types

enum class  Type {
  kNoReply ,
  kString ,
  kArray ,
  kInteger ,
  kNil ,
  kStatus ,
  kError
}
 
using Array = std::vector<ReplyData>
 

Public Member Functions

MovableKeyValues GetMovableKeyValues ()
 
 ReplyData (const redisReply *reply)
 
 ReplyData (Array &&array)
 
 ReplyData (std::string s)
 
 ReplyData (int value)
 
 operator bool () const
 
Type GetType () const
 
std::string GetTypeString () const
 
bool IsString () const
 
bool IsArray () const
 
bool IsInt () const
 
bool IsNil () const
 
bool IsStatus () const
 
bool IsError () const
 
bool IsUnusableInstanceError () const
 
bool IsReadonlyError () const
 
bool IsUnknownCommandError () const
 
bool IsErrorMoved () const
 
bool IsErrorAsk () const
 
bool IsErrorClusterdown () const
 
const std::string & GetString () const
 
std::string & GetString ()
 
const Array & GetArray () const
 
Array & GetArray ()
 
int64_t GetInt () const
 
const std::string & GetStatus () const
 
std::string & GetStatus ()
 
const std::string & GetError () const
 
std::string & GetError ()
 
const ReplyDataoperator[] (size_t idx) const
 
ReplyDataoperator[] (size_t idx)
 
size_t GetSize () const
 
std::string ToDebugString () const
 
KeyValues GetKeyValues () const
 
void ExpectType (ReplyData::Type type, const std::string &request_description={}) const
 
void ExpectString (const std::string &request_description={}) const
 
void ExpectArray (const std::string &request_description={}) const
 
void ExpectInt (const std::string &request_description={}) const
 
void ExpectNil (const std::string &request_description={}) const
 
void ExpectStatus (const std::string &request_description={}) const
 
void ExpectStatusEqualTo (const std::string &expected_status_str, const std::string &request_description={}) const
 
void ExpectError (const std::string &request_description={}) const
 

Static Public Member Functions

static ReplyData CreateError (std::string &&error_msg)
 
static ReplyData CreateStatus (std::string &&status_msg)
 
static ReplyData CreateNil ()
 
static std::string TypeToString (Type type)
 

Member Typedef Documentation

◆ Array

using storages::redis::ReplyData::Array = std::vector<ReplyData>

Definition at line 22 of file reply.hpp.

Member Enumeration Documentation

◆ Type

enum class storages::redis::ReplyData::Type
strong

Definition at line 24 of file reply.hpp.

Member Function Documentation

◆ GetArray() [1/2]

Array & storages::redis::ReplyData::GetArray ( )
inline

Definition at line 161 of file reply.hpp.

◆ GetArray() [2/2]

const Array & storages::redis::ReplyData::GetArray ( ) const
inline

Definition at line 156 of file reply.hpp.

◆ GetError() [1/2]

std::string & storages::redis::ReplyData::GetError ( )
inline

Definition at line 186 of file reply.hpp.

◆ GetError() [2/2]

const std::string & storages::redis::ReplyData::GetError ( ) const
inline

Definition at line 181 of file reply.hpp.

◆ GetInt()

int64_t storages::redis::ReplyData::GetInt ( ) const
inline

Definition at line 166 of file reply.hpp.

◆ GetStatus() [1/2]

std::string & storages::redis::ReplyData::GetStatus ( )
inline

Definition at line 176 of file reply.hpp.

◆ GetStatus() [2/2]

const std::string & storages::redis::ReplyData::GetStatus ( ) const
inline

Definition at line 171 of file reply.hpp.

◆ GetString() [1/2]

std::string & storages::redis::ReplyData::GetString ( )
inline

Definition at line 151 of file reply.hpp.

◆ GetString() [2/2]

const std::string & storages::redis::ReplyData::GetString ( ) const
inline

Definition at line 146 of file reply.hpp.

◆ GetType()

Type storages::redis::ReplyData::GetType ( ) const
inline

Definition at line 127 of file reply.hpp.

◆ IsArray()

bool storages::redis::ReplyData::IsArray ( ) const
inline

Definition at line 131 of file reply.hpp.

◆ IsError()

bool storages::redis::ReplyData::IsError ( ) const
inline

Definition at line 135 of file reply.hpp.

◆ IsErrorAsk()

bool storages::redis::ReplyData::IsErrorAsk ( ) const
inline

Definition at line 142 of file reply.hpp.

◆ IsErrorClusterdown()

bool storages::redis::ReplyData::IsErrorClusterdown ( ) const
inline

Definition at line 144 of file reply.hpp.

◆ IsErrorMoved()

bool storages::redis::ReplyData::IsErrorMoved ( ) const
inline

Definition at line 140 of file reply.hpp.

◆ IsInt()

bool storages::redis::ReplyData::IsInt ( ) const
inline

Definition at line 132 of file reply.hpp.

◆ IsNil()

bool storages::redis::ReplyData::IsNil ( ) const
inline

Definition at line 133 of file reply.hpp.

◆ IsStatus()

bool storages::redis::ReplyData::IsStatus ( ) const
inline

Definition at line 134 of file reply.hpp.

◆ IsString()

bool storages::redis::ReplyData::IsString ( ) const
inline

Definition at line 130 of file reply.hpp.

◆ operator bool()

storages::redis::ReplyData::operator bool ( ) const
inlineexplicit

Definition at line 125 of file reply.hpp.

◆ operator[]() [1/2]

ReplyData & storages::redis::ReplyData::operator[] ( size_t idx)
inline

Definition at line 196 of file reply.hpp.

◆ operator[]() [2/2]

const ReplyData & storages::redis::ReplyData::operator[] ( size_t idx) const
inline

Definition at line 191 of file reply.hpp.


The documentation for this class was generated from the following file: