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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?