From b4d6e9d88887d42e98fa33ef0fab498e2bfaa8be Mon Sep 17 00:00:00 2001 From: Igor malinovskiy Date: Mon, 16 Feb 2015 17:08:50 +0200 Subject: [PATCH] Update scan commands --- src/app/models/key-models/hashkey.cpp | 2 +- src/app/models/key-models/setkey.cpp | 2 +- src/app/models/treeoperations.cpp | 2 +- src/modules/connections-tree/items/databaseitem.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/models/key-models/hashkey.cpp b/src/app/models/key-models/hashkey.cpp index e4d93087..4dfc0da4 100644 --- a/src/app/models/key-models/hashkey.cpp +++ b/src/app/models/key-models/hashkey.cpp @@ -88,7 +88,7 @@ void HashKeyModel::loadRows(unsigned long rowStart, unsigned long, std::function { if (isPartialLoadingSupported()) { QSharedPointer 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) { diff --git a/src/app/models/key-models/setkey.cpp b/src/app/models/key-models/setkey.cpp index 6e3a7c58..35dd8c0f 100644 --- a/src/app/models/key-models/setkey.cpp +++ b/src/app/models/key-models/setkey.cpp @@ -43,7 +43,7 @@ void SetKeyModel::loadRows(unsigned long rowStart, unsigned long, std::function< { if (isPartialLoadingSupported()) { QSharedPointer 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) { diff --git a/src/app/models/treeoperations.cpp b/src/app/models/treeoperations.cpp index 36befe25..1d1008aa 100644 --- a/src/app/models/treeoperations.cpp +++ b/src/app/models/treeoperations.cpp @@ -87,7 +87,7 @@ void TreeOperations::getDatabaseKeys(uint dbIndex, std::functiongetConfig().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 keyCmd(new RedisClient::ScanCommand(cmd, this, dbIndex)); m_connection->retrieveCollection(keyCmd, [this, callback](QVariant r) { diff --git a/src/modules/connections-tree/items/databaseitem.cpp b/src/modules/connections-tree/items/databaseitem.cpp index a11a9b7a..cb3699c7 100644 --- a/src/modules/connections-tree/items/databaseitem.cpp +++ b/src/modules/connections-tree/items/databaseitem.cpp @@ -79,7 +79,7 @@ QSharedPointer DatabaseItem::getContextMenu(TreeItem::ParentView& treeVie QSharedPointer 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();