The Command class.
More...
#include <command.h>
|
typedef std::function< void(Response, QString)> | Callback |
|
|
static QList< QByteArray > | splitCommandString (const QString &) |
| Parse command from raw string. Useful for CLI clients. More...
|
|
|
QObject * | m_owner |
|
QList< QByteArray > | m_commandWithArguments |
|
int | m_dbIndex |
|
bool | m_hiPriorityCommand |
|
Callback | m_callback |
|
The Command class.
This class is part of Public API but should be used directly only for advanced cases.
RedisClient::Command::Command |
( |
const QList< QByteArray > & |
cmd, |
|
|
int |
db = -1 |
|
) |
| |
Constructs command with out callback.
- Parameters
-
cmd | - Command parts |
db | - Database index where this command should be executed |
RedisClient::Command::Command |
( |
const QList< QByteArray > & |
cmd, |
|
|
QObject * |
context, |
|
|
Callback |
callback, |
|
|
int |
db = -1 |
|
) |
| |
Constructs command with callback.
- Parameters
-
cmd | - Command parts |
context | - QObject, command will be canceled if this object destroyed |
callback | - Callback for response processing |
db | - Database index where this command should be executed |
Append additional arg/part to command ("SET 1" + "2")
- Parameters
-
- Returns
- Reference to current object
QByteArray RedisClient::Command::getByteRepresentation |
( |
| ) |
const |
Get command in RESP format.
- Returns
- QByteArray
RedisClient::Command::Callback RedisClient::Command::getCallBack |
( |
| ) |
const |
int RedisClient::Command::getDbIndex |
( |
| ) |
const |
Get database index where this command should be executed.
- Returns
QObject * RedisClient::Command::getOwner |
( |
| ) |
const |
Get callback context.
- Returns
QString RedisClient::Command::getPartAsString |
( |
int |
i | ) |
|
Get specific argument/part of the command.
- Parameters
-
- Returns
QByteArray RedisClient::Command::getRawString |
( |
int |
limit = 200 | ) |
const |
Get source command as single string.
- Returns
QList< QByteArray > RedisClient::Command::getSplitedRepresentattion |
( |
| ) |
const |
Get source command as list of args.
- Returns
bool RedisClient::Command::hasCallback |
( |
| ) |
const |
bool RedisClient::Command::hasDbIndex |
( |
| ) |
const |
bool RedisClient::Command::isHiPriorityCommand |
( |
| ) |
const |
isHiPriorityCommand
- Returns
bool RedisClient::Command::isValid |
( |
| ) |
const |
void RedisClient::Command::setCallBack |
( |
QObject * |
context, |
|
|
Callback |
callback |
|
) |
| |
Set context and callback.
- Parameters
-
QList< QByteArray > RedisClient::Command::splitCommandString |
( |
const QString & |
rawCommand | ) |
|
|
static |
Parse command from raw string. Useful for CLI clients.
- Returns
- Command parts as list.
The documentation for this class was generated from the following files:
- /home/maker/projects/rdm/3rdparty/qredisclient/src/qredisclient/command.h
- /home/maker/projects/rdm/3rdparty/qredisclient/src/qredisclient/command.cpp