mirror of
https://github.com/redis/RedisDesktopManager.git
synced 2026-10-29 19:51:51 +08:00
Update scan commands
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user