-
Notifications
You must be signed in to change notification settings - Fork 561
Replies
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.
bool is_array(void) constReturns whether the reply is an array or not.
bool is_string(void) constReturns whether the reply is a string (simple string or bulk string) or not.
bool is_simple_string(void) constReturns whether the reply is a simple string or not.
bool is_bulk_string(void) constReturns whether the reply is a bulk string or not.
bool is_error(void) constReturns whether the reply is an error or not.
bool is_integer(void) constReturns whether the reply is an integer or not.
bool is_null(void) constReturns whether the reply is null or not.
const std::vector<reply>& as_array(void) constReturns the reply as an array.
Throws cpp_redis::redis_error if the reply is not an array.
const std::string& as_string(void) constReturns the reply as a string.
Throws cpp_redis::redis_error if the reply is not a string.
int as_integer(void) constReturns the reply as an integer.
Throws cpp_redis::redis_error if the reply is not an integer.
type get_type(void) constReturn the type of the reply. The possible values are the following:
enum class type {
array,
bulk_string,
error,
integer,
simple_string,
null
};Need more information? Contact me.