File Information
Library: Redis
Package: Redis
Header: Poco/Redis/Type.h
Description
Inheritance
Known Derived Classes: Type
Member Summary
Member Functions: createRedisType, isArray, isBulkString, isError, isInteger, isSimpleString, read, toString, type
Types Aliases
Ptr
using Ptr = SharedPtr < RedisType >;
Enumerations
Types
Redis Integer
Redis Simple String
Redis Bulkstring
Constructors
RedisType
RedisType();
Creates the RedisType.
Destructor
~RedisType
virtual ~RedisType();
Destroys the RedisType.
Member Functions
createRedisType
static RedisType::Ptr createRedisType(
char marker
);
Create a Redis type based on the marker:
- '+': a simple string (std::string)
- '-': an error (Error)
- '$': a bulk string (BulkString)
- '*': an array (Array)
- ':': a signed 64 bit integer (Int64)
isArray
bool isArray() const;
Returns true when the value is a Redis array.
isBulkString
bool isBulkString() const;
Returns true when the value is a Redis bulkstring.
isError
bool isError() const;
Returns true when the value is a Redis error.
isInteger
bool isInteger() const;
Returns true when the value is a Redis integer (64 bit integer).
isSimpleString
bool isSimpleString() const;
Returns true when the value is a simple string.
read
virtual void read(
RedisInputStream & input
) = 0;
Reads the value from the stream.
toString
virtual std::string toString() const = 0;
Converts the value to a RESP (REdis Serialization Protocol) string.
type
virtual int type() const = 0;
Returns the type of the value.