mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-31 22:45:36 +01:00
An array can contain other arrays ... it can even contain an error ...
This commit is contained in:
parent
901751f800
commit
f77642a77a
@ -23,12 +23,14 @@
|
||||
|
||||
#include "Poco/Redis/Redis.h"
|
||||
#include "Poco/Redis/Type.h"
|
||||
#include "Poco/Redis/Error.h"
|
||||
#include "Poco/Redis/Exception.h"
|
||||
|
||||
namespace Poco {
|
||||
namespace Redis {
|
||||
|
||||
class Redis_API Array
|
||||
/// Represents a Redis Array.
|
||||
{
|
||||
public:
|
||||
Array();
|
||||
@ -123,13 +125,19 @@ void Type<Array>::read(RedisSocket& socket)
|
||||
switch(elementType)
|
||||
{
|
||||
case ElementTraits<Int64>::marker :
|
||||
element = new Type<Int64>();
|
||||
element = new Type<Int64>();
|
||||
break;
|
||||
case ElementTraits<std::string>::marker :
|
||||
element = new Type<std::string>();
|
||||
break;
|
||||
case ElementTraits<BulkString>::marker :
|
||||
element = new Type<BulkString>();
|
||||
element = new Type<BulkString>();
|
||||
break;
|
||||
case ElementTraits<Array>::marker :
|
||||
element = new Type<Array>();
|
||||
break;
|
||||
case ElementTraits<Error>::marker :
|
||||
element = new Type<Error>();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,6 @@ class Redis_API Client
|
||||
/// {
|
||||
/// // We have a Null value
|
||||
/// }
|
||||
///
|
||||
/// An Array can't contain another Array.
|
||||
{
|
||||
public:
|
||||
typedef Poco::SharedPtr<Client> Ptr;
|
||||
@ -152,6 +150,7 @@ private:
|
||||
/// $ : a bulk string (BulkString)
|
||||
/// * : an array (Array)
|
||||
/// : : a signed 64 bit integer (Int64)
|
||||
friend class Array;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user