Update scan commands

This commit is contained in:
Igor malinovskiy
2015-02-16 17:08:50 +02:00
parent 8ddfae6ddd
commit b4d6e9d888
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ void HashKeyModel::loadRows(unsigned long rowStart, unsigned long, std::function
{
if (isPartialLoadingSupported()) {
QSharedPointer<RedisClient::ScanCommand> cmd(new RedisClient::ScanCommand(
QString("HSCAN %1 0").arg(m_keyFullPath),
QString("HSCAN %1 0 COUNT 10000").arg(m_keyFullPath),
this, m_dbIndex));
m_connection->retrieveCollection(cmd, [this, callback, rowStart](QVariant result) {
+1 -1
View File
@@ -43,7 +43,7 @@ void SetKeyModel::loadRows(unsigned long rowStart, unsigned long, std::function<
{
if (isPartialLoadingSupported()) {
QSharedPointer<RedisClient::ScanCommand> cmd(new RedisClient::ScanCommand(
QString("SSCAN %1 0").arg(m_keyFullPath),
QString("SSCAN %1 0 COUNT 10000").arg(m_keyFullPath),
this, m_dbIndex));
m_connection->retrieveCollection(cmd, [this, callback, rowStart](QVariant result) {
+1 -1
View File
@@ -87,7 +87,7 @@ void TreeOperations::getDatabaseKeys(uint dbIndex, std::function<void (const Con
QString keyPattern = m_connection->getConfig().keysPattern();
if (m_connection->getServerVersion() >= 2.8) {
QString cmd = QString("scan 0 MATCH %1").arg(keyPattern);
QString cmd = QString("scan 0 MATCH %1 COUNT 10000").arg(keyPattern);
QSharedPointer<RedisClient::ScanCommand> keyCmd(new RedisClient::ScanCommand(cmd, this, dbIndex));
m_connection->retrieveCollection(keyCmd, [this, callback](QVariant r) {
@@ -79,7 +79,7 @@ QSharedPointer<QMenu> DatabaseItem::getContextMenu(TreeItem::ParentView& treeVie
QSharedPointer<QMenu> menu(new QMenu());
//new key action
QAction* newKey = new QAction(QIcon(":/images/terminal.png"), "Add new key", menu.data());
QAction* newKey = new QAction(QIcon(":/images/add.png"), "Add new key", menu.data());
QObject::connect(newKey, &QAction::triggered, this, [this]() { m_operations->openNewKeyDialog(m_index); });
menu->addAction(newKey);
menu->addSeparator();