Arduino-Redis
A Redis library for Arduino.
Public Member Functions | List of all members
RedisCommand Class Reference

Detailed Description

A Command (a specialized Array subclass): https://redis.io/topics/protocol#sending-commands-to-a-redis-server

Definition at line 158 of file RedisInternal.h.

Public Member Functions

 RedisCommand (String command)
 
 RedisCommand (String command, ArgList args)
 
 ~RedisCommand () override
 
std::shared_ptr< RedisObjectissue (Client &cmdClient)
 
template<typename T >
issue_typed (Client &cmdClient)
 
template<>
int issue_typed (Client &cmdClient)
 
template<>
bool issue_typed (Client &cmdClient)
 
template<>
String issue_typed (Client &cmdClient)
 
- Public Member Functions inherited from RedisArray
 RedisArray ()
 
 RedisArray (Client &c)
 
 ~RedisArray () override
 
void add (std::shared_ptr< RedisObject > param)
 
 operator std::vector< String > () const
 
 operator std::vector< std::shared_ptr< RedisObject >> () const
 
virtual void init (Client &client) override
 
virtual String RESP () override
 
- Public Member Functions inherited from RedisObject
 RedisObject ()
 
 RedisObject (Type tc)
 
 RedisObject (Type tc, Client &c)
 
virtual ~RedisObject ()
 
virtual operator String ()
 
Type type () const
 

Additional Inherited Members

- Public Types inherited from RedisObject
enum  Type {
  NoType = '\0', SimpleString = '+', Error = '-', Integer = ':',
  BulkString = '$', Array = '*', InternalError = '!'
}
 
- Static Public Member Functions inherited from RedisObject
static std::shared_ptr< RedisObjectparseTypeNonBlocking (Client &)
 
static std::shared_ptr< RedisObjectparseType (Client &)
 
- Protected Attributes inherited from RedisArray
std::vector< std::shared_ptr< RedisObject > > vec
 
- Protected Attributes inherited from RedisObject
String data
 
Type _type = Type::NoType
 

#include <RedisInternal.h>

Inheritance diagram for RedisCommand:
Inheritance graph
[legend]

Constructor & Destructor Documentation

◆ RedisCommand() [1/2]

RedisCommand::RedisCommand ( String  command)
inline

Definition at line 161 of file RedisInternal.h.

◆ RedisCommand() [2/2]

RedisCommand::RedisCommand ( String  command,
ArgList  args 
)
inline

Definition at line 166 of file RedisInternal.h.

◆ ~RedisCommand()

RedisCommand::~RedisCommand ( )
inlineoverride

Definition at line 175 of file RedisInternal.h.

Member Function Documentation

◆ issue()

std::shared_ptr< RedisObject > RedisCommand::issue ( Client &  cmdClient)

Issue the command on the bytestream represented by cmdClient.

Parameters
cmdClientThe client object representing the bytestream connection to a Redis server.
Returns
A shared pointer of a "RedisObject" representing a concrete subclass instantiated as a result of parsing the Redis server return value. Check RedisObject::type() to determine concrete type.

Definition at line 101 of file RedisInternal.cpp.

◆ issue_typed() [1/4]

template<>
int RedisCommand::issue_typed ( Client &  cmdClient)

Definition at line 115 of file RedisInternal.cpp.

◆ issue_typed() [2/4]

template<>
bool RedisCommand::issue_typed ( Client &  cmdClient)

Definition at line 126 of file RedisInternal.cpp.

◆ issue_typed() [3/4]

template<>
String RedisCommand::issue_typed ( Client &  cmdClient)

Definition at line 135 of file RedisInternal.cpp.

◆ issue_typed() [4/4]

template<typename T >
T RedisCommand::issue_typed ( Client &  cmdClient)