qredisclient

:key: Asynchronous Qt-based Redis client with TLS support.

  • Owner: uglide/qredisclient
  • Platform:
  • License:: Other
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

qredisclient

API documenation, Examples

Build Status
Build status
Coverage Status

Asynchronous Qt-based Redis client with TLS support. This client is developed for RedisDesktopManager by Igor Malinovskiy

#include "qredisclient/redisclient.h"

int main(int argc, char *argv[])
{
  // Init qredisclient
  initRedisClient();
  
  // Create connection to local redis
  RedisClient::ConnectionConfig config("127.0.0.1");
  RedisClient::Connection connection(config);
  
  // Run command and wait for result
  connection.commandSync({"PING"}); 
  
  // Run command in async mode
  connection.command({"PING"});
  
  // Run command in db #2
  connection.command({"PING"}, 2); 
  
  // Run async command with callback
  connection.command({"PING"}, [](RedisClient::Response r) { 
    QVariant val = r.getValue(); // get value from response
    // do stuff
  });

  // Use addToPipeline() to enable MULTI+EXEC transactions
  RedisClient::Command cmd;
  cmd.addToPipeline({"SET", "foo", "bar"});
  cmd.addToPipeline({"HSET" "foz", "key", "value"});
  RedisClient::Response response = connection.commandSync(cmd);

  // See more usage examples in the tests/unit_tests folder
}

Supported Qt versions: 5.6-5.9

Main metrics

Overview
Name With Owneruglide/qredisclient
Primary LanguageC++
Program languageC++ (Language Count: 6)
Platform
License:Other
所有者活动
Created At2015-09-10 21:32:46
Pushed At2022-10-05 14:50:23
Last Commit At2022-10-05 16:50:18
Release Count0
用户参与
Stargazers Count163
Watchers Count22
Fork Count90
Commits Count257
Has Issues Enabled
Issues Count22
Issue Open Count8
Pull Requests Count31
Pull Requests Open Count1
Pull Requests Close Count7
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private