A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cylix.github.io/cpp_redis/html/classcpp__redis_1_1reply.html below:

cpp_redis: cpp_redis::reply Class Reference

#include <reply.hpp>

enum   type {
  error = __CPP_REDIS_REPLY_ERR, bulk_string = __CPP_REDIS_REPLY_BULK, simple_string = __CPP_REDIS_REPLY_SIMPLE, null = __CPP_REDIS_REPLY_NULL,
  integer = __CPP_REDIS_REPLY_INT, array = __CPP_REDIS_REPLY_ARRAY
}   enum   string_type { error = __CPP_REDIS_REPLY_ERR, bulk_string = __CPP_REDIS_REPLY_BULK, simple_string = __CPP_REDIS_REPLY_SIMPLE }  

cpp_redis::reply is the class that wraps Redis server replies. That is, cpp_redis::reply objects are passed as parameters of commands callbacks and contain the server's response.

◆ string_type

specific type of replies for string-based replies

◆ type

type of reply, baed on redis server standard replies

◆ reply() [1/4] cpp_redis::reply::reply ( void  )

default ctor (set a null reply)

◆ reply() [2/4] cpp_redis::reply::reply ( const std::string &  value, string_type  reply_type  )

ctor for string values

Parameters
value string value reply_type of string reply
◆ reply() [3/4] cpp_redis::reply::reply ( int64_t  value )

ctor for int values

Parameters
◆ reply() [4/4] cpp_redis::reply::reply ( const std::vector< reply > &  rows )

ctor for array values

Parameters
Returns
current instance
◆ as_array() const std::vector<reply>& cpp_redis::reply::as_array ( void  ) const
Returns
the underlying array
◆ as_integer() int64_t cpp_redis::reply::as_integer ( void  ) const
Returns
the underlying integer
◆ as_string() const std::string& cpp_redis::reply::as_string ( void  ) const
Returns
the underlying string
◆ error() const std::string& cpp_redis::reply::error ( void  ) const
Returns
the underlying error
◆ get_type() type cpp_redis::reply::get_type ( void  ) const ◆ is_array() bool cpp_redis::reply::is_array ( void  ) const
Returns
whether the reply is an array
◆ is_bulk_string() bool cpp_redis::reply::is_bulk_string ( void  ) const
Returns
whether the reply is a bulk string
◆ is_error() bool cpp_redis::reply::is_error ( void  ) const
Returns
whether the reply is an error
◆ is_integer() bool cpp_redis::reply::is_integer ( void  ) const
Returns
whether the reply is an integer
◆ is_null() bool cpp_redis::reply::is_null ( void  ) const
Returns
whether the reply is null
◆ is_simple_string() bool cpp_redis::reply::is_simple_string ( void  ) const
Returns
whether the reply is a simple string
◆ is_string() bool cpp_redis::reply::is_string ( void  ) const
Returns
whether the reply is a string (simple, bulk, error)
◆ ko() bool cpp_redis::reply::ko ( void  ) const
Returns
true if function is an error
◆ ok() bool cpp_redis::reply::ok ( void  ) const
Returns
true if function is not an error
◆ operator bool() cpp_redis::reply::operator bool ( void  ) const

convenience implicit conversion, same as !is_null() / ok()

◆ operator<<() reply& cpp_redis::reply::operator<< ( const replyreply )

for array replies, add a new row to the reply

Parameters
reply new row to be appended
Returns
current instance
◆ set() [1/4] void cpp_redis::reply::set ( void  )

set reply as null

◆ set() [2/4] void cpp_redis::reply::set ( const std::string &  value, string_type  reply_type  )

set a string reply

Parameters
value string value reply_type of string reply
◆ set() [3/4] void cpp_redis::reply::set ( int64_t  value )

set an integer reply

Parameters
◆ set() [4/4] void cpp_redis::reply::set ( const std::vector< reply > &  rows )

set an array reply

Parameters

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4