userver: storages::redis::ReplyData Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
storages::redis::ReplyData Class Referencefinal

Your opinion will help to improve our service

Leave a feedback >

Detailed Description

Definition at line 20 of file reply.hpp.

Classes

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 noexcept
 
Type GetType () const noexcept
 
std::string GetTypeString () const
 
bool IsString () const noexcept
 
bool IsArray () const noexcept
 
bool IsInt () const noexcept
 
bool IsNil () const noexcept
 
bool IsStatus () const noexcept
 
bool IsError () const noexcept
 
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 ()
 
std::int64_t GetInt () const
 
const std::string & GetStatus () const
 
std::string & GetStatus ()
 
const std::string & GetError () const
 
std::string & GetError ()
 
std::size_t GetSize () const noexcept
 
std::string ToDebugString () 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 123 of file reply.hpp.

◆ GetArray() [2/2]

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

Definition at line 118 of file reply.hpp.

◆ GetError() [1/2]

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

Definition at line 148 of file reply.hpp.

◆ GetError() [2/2]

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

Definition at line 143 of file reply.hpp.

◆ GetInt()

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

Definition at line 128 of file reply.hpp.

◆ GetStatus() [1/2]

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

Definition at line 138 of file reply.hpp.

◆ GetStatus() [2/2]

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

Definition at line 133 of file reply.hpp.

◆ GetString() [1/2]

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

Definition at line 113 of file reply.hpp.

◆ GetString() [2/2]

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

Definition at line 108 of file reply.hpp.

◆ GetType()

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

Definition at line 86 of file reply.hpp.

◆ IsArray()

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

Definition at line 93 of file reply.hpp.

◆ IsError()

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

Definition at line 97 of file reply.hpp.

◆ IsErrorAsk()

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

Definition at line 104 of file reply.hpp.

◆ IsErrorClusterdown()

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

Definition at line 106 of file reply.hpp.

◆ IsErrorMoved()

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

Definition at line 102 of file reply.hpp.

◆ IsInt()

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

Definition at line 94 of file reply.hpp.

◆ IsNil()

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

Definition at line 95 of file reply.hpp.

◆ IsStatus()

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

Definition at line 96 of file reply.hpp.

◆ IsString()

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

Definition at line 92 of file reply.hpp.

◆ operator bool()

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

Definition at line 84 of file reply.hpp.


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