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

Detailed Description

Definition at line 19 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
 
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 redis::ReplyData::Array = std::vector<ReplyData>

Definition at line 21 of file reply.hpp.

Member Enumeration Documentation

◆ Type

enum class redis::ReplyData::Type
strong

Definition at line 23 of file reply.hpp.

Member Function Documentation

◆ GetArray() [1/2]

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

Definition at line 169 of file reply.hpp.

◆ GetArray() [2/2]

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

Definition at line 164 of file reply.hpp.

◆ GetError() [1/2]

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

Definition at line 194 of file reply.hpp.

◆ GetError() [2/2]

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

Definition at line 189 of file reply.hpp.

◆ GetInt()

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

Definition at line 174 of file reply.hpp.

◆ GetStatus() [1/2]

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

Definition at line 184 of file reply.hpp.

◆ GetStatus() [2/2]

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

Definition at line 179 of file reply.hpp.

◆ GetString() [1/2]

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

Definition at line 159 of file reply.hpp.

◆ GetString() [2/2]

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

Definition at line 154 of file reply.hpp.

◆ GetType()

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

Definition at line 133 of file reply.hpp.

◆ IsArray()

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

Definition at line 137 of file reply.hpp.

◆ IsError()

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

Definition at line 141 of file reply.hpp.

◆ IsErrorAsk()

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

Definition at line 150 of file reply.hpp.

◆ IsErrorMoved()

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

Definition at line 146 of file reply.hpp.

◆ IsInt()

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

Definition at line 138 of file reply.hpp.

◆ IsNil()

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

Definition at line 139 of file reply.hpp.

◆ IsStatus()

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

Definition at line 140 of file reply.hpp.

◆ IsString()

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

Definition at line 136 of file reply.hpp.

◆ operator bool()

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

Definition at line 131 of file reply.hpp.

◆ operator[]() [1/2]

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

Definition at line 204 of file reply.hpp.

◆ operator[]() [2/2]

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

Definition at line 199 of file reply.hpp.


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