qredisclient

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

  • 所有者: uglide/qredisclient
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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

主要指标

概览
名称与所有者uglide/qredisclient
主编程语言C++
编程语言C++ (语言数: 6)
平台
许可证Other
所有者活动
创建于2015-09-10 21:32:46
推送于2022-10-05 14:50:23
最后一次提交2022-10-05 16:50:18
发布数0
用户参与
星数163
关注者数22
派生数90
提交数257
已启用问题?
问题数22
打开的问题数8
拉请求数31
打开的拉请求数1
关闭的拉请求数7
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?