MCPcopy Create free account
hub / github.com/cc20110101/RedisView / singleCommand

Method singleCommand

src/RedisView/RedisLib/RedisCluster.cpp:586–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586QByteArray RedisCluster::singleCommand(QString &str, int index)
587{
588 str = str.trimmed();
589 //str.replace(QRegExp("[\\s]+"), " ");
590
591 if(str.isEmpty())
592 return "-command is empty\r\n";
593
594 if(index == -1) {
595 if(_redisClient)
596 return _redisClient->command(str);
597 } else if(index > -1 && index < _vClusterClients.size()) {
598 if(_vClusterClients[index]._client)
599 return _vClusterClients[index]._client->command(str);
600 }
601 return "-client is empty\r\n";
602}
603
604RedisClient * RedisCluster::getClient(const QString &key) {
605 _byteArray = key.toLocal8Bit();

Callers

nothing calls this directly

Calls 1

commandMethod · 0.45

Tested by

no test coverage detected