2019-07-28 10:31:56 +08:00
|
|
|
|
#pragma once
|
2017-06-02 14:47:24 +08:00
|
|
|
|
#include "../acl_cpp_define.hpp"
|
2019-05-09 13:57:51 +08:00
|
|
|
|
#include "../stdlib/noncopyable.hpp"
|
2015-03-27 17:05:12 +08:00
|
|
|
|
#include <map>
|
2015-04-02 22:19:57 +08:00
|
|
|
|
#include <list>
|
|
|
|
|
#include <vector>
|
2017-06-02 14:47:24 +08:00
|
|
|
|
#include "redis_result.hpp"
|
2015-01-20 00:10:17 +08:00
|
|
|
|
|
2019-05-19 16:54:20 +08:00
|
|
|
|
#if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
|
2019-05-18 21:19:21 +08:00
|
|
|
|
|
2015-01-20 00:10:17 +08:00
|
|
|
|
namespace acl
|
|
|
|
|
{
|
|
|
|
|
|
2020-07-20 11:21:47 +08:00
|
|
|
|
class redis_request;
|
2015-01-20 00:10:17 +08:00
|
|
|
|
class redis_client;
|
2015-04-02 22:19:57 +08:00
|
|
|
|
class redis_client_cluster;
|
2020-07-20 11:21:47 +08:00
|
|
|
|
class redis_client_pipeline;
|
2021-01-01 20:35:07 +08:00
|
|
|
|
class redis_pipeline_message;
|
2015-01-20 00:10:17 +08:00
|
|
|
|
|
2015-01-26 19:58:02 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* redis <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD>鸸<EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* the redis command classes's base virtual class, which includes the basic
|
|
|
|
|
* functions for all sub-classes
|
2015-01-26 19:58:02 +08:00
|
|
|
|
*/
|
2019-05-09 13:57:51 +08:00
|
|
|
|
class ACL_CPP_API redis_command : public noncopyable
|
2015-01-20 00:10:17 +08:00
|
|
|
|
{
|
|
|
|
|
public:
|
2015-03-29 19:27:41 +08:00
|
|
|
|
/**
|
2020-07-20 11:21:47 +08:00
|
|
|
|
* ȱʡ<EFBFBD>Ĺ<EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ô˹<EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* set_client <EFBFBD><EFBFBD> set_cluster <EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>
|
2015-03-29 19:27:41 +08:00
|
|
|
|
* default constructor. You must set the communication method by
|
|
|
|
|
* set_client or set_cluster functions.
|
|
|
|
|
*/
|
2016-01-17 13:35:12 +08:00
|
|
|
|
redis_command(void);
|
2015-03-29 19:27:41 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2020-07-20 11:21:47 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>ʹ<EFBFBD>÷Ǽ<EFBFBD>Ⱥģʽʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ô˹<EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis ͨ<EFBFBD>Ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2015-03-29 19:27:41 +08:00
|
|
|
|
* Using this constructor to set the redis communication mode,
|
|
|
|
|
* usually in no-cluster mode.
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param conn {redis_client*} redis ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2015-03-29 19:27:41 +08:00
|
|
|
|
* the redis communication in no-cluster mode
|
|
|
|
|
*/
|
2015-02-14 01:01:29 +08:00
|
|
|
|
redis_command(redis_client* conn);
|
2015-03-29 19:27:41 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2020-07-20 11:21:47 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>Ⱥģʽ<EFBFBD>Ĺ<EFBFBD><EFBFBD>캯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱָ<EFBFBD><EFBFBD><EFBFBD>˼<EFBFBD>Ⱥģʽ<EFBFBD><EFBFBD>
|
|
|
|
|
* redis_client_cluster <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2015-04-02 22:19:57 +08:00
|
|
|
|
* Using this constructor to set the redis_client_cluster, usually in
|
2015-03-29 19:27:41 +08:00
|
|
|
|
* cluster mode.
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param cluster {redis_client_cluster*} redis <EFBFBD><EFBFBD>Ⱥ<EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD>
|
2015-03-29 19:27:41 +08:00
|
|
|
|
* redis cluster object in cluster mode
|
2015-09-27 20:59:21 +08:00
|
|
|
|
* the max of every connection pool with all the redis nodes,
|
|
|
|
|
* if be set 0, then there is no connections limit in
|
|
|
|
|
* connections pool.
|
2015-03-29 19:27:41 +08:00
|
|
|
|
*/
|
2020-07-20 11:21:47 +08:00
|
|
|
|
redis_command(redis_client_cluster* cluster);
|
|
|
|
|
|
|
|
|
|
ACL_CPP_DEPRECATED
|
2015-04-02 22:19:57 +08:00
|
|
|
|
redis_command(redis_client_cluster* cluster, size_t max_conns);
|
2015-03-29 19:27:41 +08:00
|
|
|
|
|
2020-07-20 11:21:47 +08:00
|
|
|
|
redis_command(redis_client_pipeline* pipeline);
|
|
|
|
|
|
2016-04-01 23:08:26 +08:00
|
|
|
|
virtual ~redis_command(void);
|
2015-01-20 00:10:17 +08:00
|
|
|
|
|
2016-12-15 13:39:26 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>ڽ<EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> socket <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӱ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> DEBUG ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD><EFBFBD><EFBFBD>
|
2016-12-15 13:39:26 +08:00
|
|
|
|
* @param on {bool}
|
|
|
|
|
*/
|
|
|
|
|
void set_check_addr(bool on);
|
|
|
|
|
|
2015-01-26 19:58:02 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>ʹ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>̳<EFBFBD><EFBFBD><EFBFBD> redis_command <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD>һ<EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD>ϴβ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* when reusing a redis command sub-class, the reset method should be
|
|
|
|
|
* called first to rlease some resources in last command operation
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param save_slot {bool} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD>Ⱥģʽʱ<EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2020-07-20 11:21:47 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD> key ֵ<EFBFBD><EFBFBD><EFBFBD>䣬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD>ϣ<EFBFBD><EFBFBD>ֵ<EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>½<EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* when in cluster mode, if your operations is on the same key, you
|
|
|
|
|
* can set the param save_slot to false which can reduse the times
|
|
|
|
|
* of compute the same key's hash-slot.
|
2015-01-26 19:58:02 +08:00
|
|
|
|
*/
|
2015-04-07 23:31:31 +08:00
|
|
|
|
void clear(bool save_slot = false);
|
|
|
|
|
|
|
|
|
|
ACL_CPP_DEPRECATED_FOR("clear")
|
2015-02-27 13:33:00 +08:00
|
|
|
|
void reset(bool save_slot = false);
|
2015-01-26 19:58:02 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>ʹ<EFBFBD>÷Ǽ<EFBFBD>Ⱥ<EFBFBD><EFBFBD>ʽʱ<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳػ<EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-29 19:27:41 +08:00
|
|
|
|
* when not using cluster mode, the function is used
|
|
|
|
|
* to set the connection for next redis command operation.
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param conn {redis_client*} <EFBFBD><EFBFBD> redis <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* the redis connection to be set in next redis operation
|
2015-01-26 19:58:02 +08:00
|
|
|
|
*/
|
2015-01-20 00:10:17 +08:00
|
|
|
|
void set_client(redis_client* conn);
|
2015-01-26 19:58:02 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰ redis <EFBFBD>ͻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get redis connection set by set_client function
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {redis_client*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL <EFBFBD><EFBFBD>ʾû<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>뵱ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>а<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* the internal redis connection be returned, NULL if no redis
|
|
|
|
|
* connection be set
|
2015-01-26 19:58:02 +08:00
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
redis_client* get_client(void) const
|
2015-01-20 00:10:17 +08:00
|
|
|
|
{
|
|
|
|
|
return conn_;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-26 00:11:10 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰ redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD>ֻ<EFBFBD>е<EFBFBD><EFBFBD>ö<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis_client
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> set_client) <EFBFBD>ſ<EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2015-04-26 00:11:10 +08:00
|
|
|
|
* get the redis-server's addr used by the current command. this
|
|
|
|
|
* method can only be used only if the redis_client was set by
|
|
|
|
|
* set_client method.
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD>ؿմ<EFBFBD> "" <EFBFBD><EFBFBD>ʾû<EFBFBD>а<EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD>
|
2015-04-26 00:11:10 +08:00
|
|
|
|
* if "" was resturned, the redis connection was not set
|
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
const char* get_client_addr(void) const;
|
2015-04-26 00:11:10 +08:00
|
|
|
|
|
2015-02-14 01:01:29 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳؼ<EFBFBD>Ⱥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* set the redis cluster object in redis cluster mode
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param cluster {redis_client_cluster*} redis <EFBFBD><EFBFBD>Ⱥ<EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* the redis_cluster connection object which can connect to any
|
|
|
|
|
* redis-server and support connection pool
|
|
|
|
|
* when dynamicly creating connection pool to any redis-server, use
|
|
|
|
|
* this param to limit the max number for each connection pool
|
2015-02-14 01:01:29 +08:00
|
|
|
|
*/
|
2020-07-20 11:21:47 +08:00
|
|
|
|
void set_cluster(redis_client_cluster* cluster);
|
|
|
|
|
|
|
|
|
|
ACL_CPP_DEPRECATED
|
2015-04-02 22:19:57 +08:00
|
|
|
|
void set_cluster(redis_client_cluster* cluster, size_t max_conns);
|
2015-02-14 01:01:29 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳؼ<EFBFBD>Ⱥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get redis_cluster object set by set_cluster function
|
2015-04-02 22:19:57 +08:00
|
|
|
|
* @return {redis_client_cluster*}
|
2015-02-14 01:01:29 +08:00
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
redis_client_cluster* get_cluster(void) const
|
2015-02-14 01:01:29 +08:00
|
|
|
|
{
|
|
|
|
|
return cluster_;
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-31 15:43:29 +08:00
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>pipelineͨ<EFBFBD>Ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>pipelineģʽ
|
|
|
|
|
* set the redis communication in pipeline mode
|
2021-06-22 16:02:21 +08:00
|
|
|
|
* @param pipeline {redis_client_pipeline*} pipeline communication object
|
2021-01-31 15:43:29 +08:00
|
|
|
|
*/
|
2022-11-21 20:27:09 +08:00
|
|
|
|
void set_pipeline(redis_client_pipeline* pipeline);
|
2021-01-31 15:43:29 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2021-06-22 16:02:21 +08:00
|
|
|
|
* get the redis pipeline communication object been set before
|
2021-01-31 15:43:29 +08:00
|
|
|
|
* @return {redis_client_pipeline*} return NULL if not set
|
|
|
|
|
*/
|
2020-07-20 17:27:32 +08:00
|
|
|
|
redis_client_pipeline* get_pipeline(void) const
|
|
|
|
|
{
|
|
|
|
|
return pipeline_;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-13 22:52:43 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD>ؾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis_command <EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2020-07-20 11:21:47 +08:00
|
|
|
|
* get memory pool handle been set
|
2015-02-13 22:52:43 +08:00
|
|
|
|
* @return {dbuf_pool*}
|
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
dbuf_pool* get_dbuf(void) const
|
2015-02-13 22:52:43 +08:00
|
|
|
|
{
|
2016-01-17 13:35:12 +08:00
|
|
|
|
return dbuf_;
|
2015-02-13 22:52:43 +08:00
|
|
|
|
}
|
|
|
|
|
|
2015-01-29 00:38:29 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get the result type returned from redis-server
|
2015-02-10 17:23:24 +08:00
|
|
|
|
* @return {redis_result_t}
|
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
redis_result_t result_type(void) const;
|
2015-02-10 17:23:24 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵΪ REDIS_RESULT_STATUS <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD>Ϣ;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* when result type is REDIS_RESULT_STATUS, the status info can be
|
|
|
|
|
* get by this function
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> "" <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* "" will be returned on error
|
2015-02-10 17:23:24 +08:00
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
const char* result_status(void) const;
|
2015-02-10 17:23:24 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵΪ REDIS_RESULT_ERROR <EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>س<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* when result type is REDIS_RESULT_ERROR, the error info can be
|
|
|
|
|
* get by this function
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD>ؿմ<EFBFBD> "" <EFBFBD><EFBFBD>ʾû<EFBFBD>г<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* "" will be returned when no error info
|
2015-02-10 17:23:24 +08:00
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
const char* result_error(void) const;
|
2015-02-10 17:23:24 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ի<EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* (result_child/result_value) <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>صĸ<EFBFBD><EFBFBD><EFBFBD>;
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* get number of result objects, just for functions
|
|
|
|
|
* result_child/result_value
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD><EFBFBD><EFBFBD>͵Ķ<EFBFBD>Ӧ<EFBFBD><EFBFBD>ϵ<EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* the relation between return value and result type, as below:
|
2015-02-10 17:23:24 +08:00
|
|
|
|
* REDIS_RESULT_ERROR: 1
|
|
|
|
|
* REDIS_RESULT_STATUS: 1
|
|
|
|
|
* REDIS_RESULT_INTEGER: 1
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* REDIS_RESULT_STRING: > 0 ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><EFBFBD>зֳɷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* when the result type is REDIS_RESULT_STRING and the the
|
|
|
|
|
* string is too large, the string was be cut into many small
|
|
|
|
|
* chunks, the returned value is the chunks number
|
2015-02-10 17:23:24 +08:00
|
|
|
|
* REDIS_RESULT_ARRAY: children_->size()
|
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
size_t result_size(void) const;
|
2015-02-10 17:23:24 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵΪ REDIS_RESULT_INTEGER <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>Ӧ<EFBFBD><EFBFBD> 32 λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get 32-bits number value if result type is REDIS_RESULT_INTERGER
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param success {bool*} <EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL ʱ<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>ɹ<EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* if the param pointer is not NULL, which will save status of
|
|
|
|
|
* success or not for result from redis-server
|
2015-02-10 17:23:24 +08:00
|
|
|
|
* @return {int}
|
|
|
|
|
*/
|
2015-02-13 22:52:43 +08:00
|
|
|
|
int result_number(bool* success = NULL) const;
|
2015-02-10 17:23:24 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵΪ REDIS_RESULT_INTEGER <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>Ӧ<EFBFBD><EFBFBD> 64 λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get 64-bits number value if result type is REDIS_RESULT_INTERGER
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param success {bool*} <EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL ʱ<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>ɹ<EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* if the param pointer is not NULL, which will save status of
|
|
|
|
|
* success or not for result from redis-server
|
2015-02-10 17:23:24 +08:00
|
|
|
|
* @return {long long int}
|
|
|
|
|
*/
|
2015-02-13 22:52:43 +08:00
|
|
|
|
long long int result_number64(bool* success = NULL) const;
|
2015-02-10 17:23:24 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>Ӧ<EFBFBD>±<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> REDIS_RESULT_ARRAY ʱ<EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get string result when result type isn't REDIS_RESULT_ARRAY
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param i {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* the array index
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param len {size_t*} <EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD> NULL ָ<EFBFBD><EFBFBD>ʱ<EFBFBD>洢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵij<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* *len will save the result's length if len is not NULL
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL <EFBFBD><EFBFBD>ʾ<EFBFBD>±<EFBFBD>Խ<EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* NULL will return if i beyonds the array's size
|
2015-02-10 17:23:24 +08:00
|
|
|
|
*/
|
2015-02-13 22:52:43 +08:00
|
|
|
|
const char* get_result(size_t i, size_t* len = NULL) const;
|
2015-02-10 17:23:24 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>жϵ<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(redis_client) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD>رգ<EFBFBD>
|
|
|
|
|
* ֻ<EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD> conn_ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ô˺<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* to judge if the redis connection was be closed, only redis_client
|
|
|
|
|
* object be set internal
|
2015-01-29 00:38:29 +08:00
|
|
|
|
* @return {bool}
|
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
bool eof(void) const;
|
2015-01-29 00:38:29 +08:00
|
|
|
|
|
2015-01-26 19:58:02 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵Ľ<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get result object of last redis operation
|
2015-01-26 19:58:02 +08:00
|
|
|
|
* @return {redis_result*}
|
|
|
|
|
*/
|
2021-01-03 22:33:50 +08:00
|
|
|
|
const redis_result* get_result(void) const;
|
2015-01-20 00:10:17 +08:00
|
|
|
|
|
2015-01-30 22:58:13 +08:00
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* get one result ojbect of array if result type is REDIS_RESULT_ARRAY
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param i {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>ֵ;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* the result array's index
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {const redis_result*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ջ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
|
|
|
|
|
* <EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL;
|
2015-03-15 17:38:50 +08:00
|
|
|
|
* NULL will be resturned when result is not REDIS_RESULT_ARRAY or
|
|
|
|
|
* array empty or error
|
2015-01-30 22:58:13 +08:00
|
|
|
|
*/
|
2015-02-13 22:52:43 +08:00
|
|
|
|
const redis_result* result_child(size_t i) const;
|
2015-01-30 22:58:13 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis-server <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵Ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>õ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* when the reply from redis-serveer are strings array, this
|
|
|
|
|
* function can be used to get the string specified by a subscript
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param i {size_t} <EFBFBD>±꣨<EFBFBD><EFBFBD> 0 <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* the subscript of strings array
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param len {size_t*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>ǿգ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>洢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD>ȣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>طǿ<EFBFBD>ָ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD>
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* if len not a NULL pointer, it will store the length of string
|
|
|
|
|
* specified by the subscript
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @return {const char*} <EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>Ӧ<EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> NULL ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>û
|
|
|
|
|
* <EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>Ϊ<EFBFBD>˱<EFBFBD>֤ʹ<EFBFBD><EFBFBD><EFBFBD>ϵİ<EFBFBD>ȫ<EFBFBD>ԣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD>֤<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \0 <EFBFBD><EFBFBD>β<EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD>ڼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD>β<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>˼<EFBFBD><EFBFBD>ݶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Σ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* Ӧ<EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD> len <EFBFBD><EFBFBD><EFBFBD>ŵij<EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* the string will be returned associate with the subscript, if there
|
|
|
|
|
* are nothing with the subscript, NULL will be returned
|
2015-01-30 22:58:13 +08:00
|
|
|
|
*/
|
2015-02-13 22:52:43 +08:00
|
|
|
|
const char* result_value(size_t i, size_t* len = NULL) const;
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
|
/**
|
2020-07-20 11:21:47 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD><EFBFBD>з<EFBFBD>Ƭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ true <EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* ʱ<EFBFBD>Ὣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* just for request package, setting flag for sending data with
|
|
|
|
|
* multi data chunks; this is useful when the request data is large
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param on {bool} <EFBFBD>ڲ<EFBFBD>Ĭ<EFBFBD><EFBFBD>ֵΪ false
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* if true the request data will not be combined one package,
|
|
|
|
|
* internal default is false
|
2015-02-13 22:52:43 +08:00
|
|
|
|
*/
|
|
|
|
|
void set_slice_request(bool on);
|
|
|
|
|
|
|
|
|
|
/**
|
2020-07-20 11:21:47 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD><EFBFBD>з<EFBFBD>Ƭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ true <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD>Ƚϴ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD><EFBFBD>з<EFBFBD>Ƭ<EFBFBD><EFBFBD><EFBFBD>ֳ<EFBFBD>һЩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* just for response package, settint flag for receiving data
|
|
|
|
|
* if split the large response data into multi little chunks
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param on {bool} <EFBFBD>ڲ<EFBFBD>Ĭ<EFBFBD><EFBFBD>ֵΪ false
|
2015-04-12 21:37:17 +08:00
|
|
|
|
* if true the response data will be splitted into multi little
|
|
|
|
|
* data, which is useful for large reponse data for avoiding
|
|
|
|
|
* malloc large continuously memory from system.
|
|
|
|
|
* internal default is false
|
2015-02-13 22:52:43 +08:00
|
|
|
|
*/
|
|
|
|
|
void set_slice_respond(bool on);
|
2015-01-30 22:58:13 +08:00
|
|
|
|
|
2016-04-01 23:08:26 +08:00
|
|
|
|
public:
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis Э<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argc {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>ظ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argv {const char*[]} redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2023-02-20 17:45:32 +08:00
|
|
|
|
* @param lens {const size_t[]} argv <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>صij<EFBFBD><EFBFBD><EFBFBD>
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param nchild {size_t} <EFBFBD>е<EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>磺subop
|
|
|
|
|
* @return {const redis_result*} <EFBFBD><EFBFBD><EFBFBD>صĽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2016-04-01 23:08:26 +08:00
|
|
|
|
*/
|
|
|
|
|
const redis_result* request(size_t argc, const char* argv[],
|
2023-02-20 17:45:32 +08:00
|
|
|
|
const size_t lens[], size_t nchild = 0);
|
2016-04-01 23:08:26 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* ֱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis Э<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param args {const std::vector<string>&} redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param nchild {size_t} <EFBFBD>е<EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>磺subop
|
|
|
|
|
* @return {const redis_result*} <EFBFBD><EFBFBD><EFBFBD>صĽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2016-04-01 23:08:26 +08:00
|
|
|
|
*/
|
|
|
|
|
const redis_result* request(const std::vector<string>& args,
|
2019-09-13 19:47:23 +08:00
|
|
|
|
size_t nchild = 0);
|
2016-04-01 23:08:26 +08:00
|
|
|
|
|
2018-11-25 23:16:25 +08:00
|
|
|
|
const string* request_buf(void) const
|
|
|
|
|
{
|
|
|
|
|
return request_buf_;
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-05 17:48:39 +08:00
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argc {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argv {const char* []} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2023-02-20 17:45:32 +08:00
|
|
|
|
* @param lens {const size_t []} ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2021-01-05 17:48:39 +08:00
|
|
|
|
* @param out {string&} <EFBFBD><EFBFBD><EFBFBD>Ŵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
static void build_request(size_t argc, const char* argv[],
|
2023-02-20 17:45:32 +08:00
|
|
|
|
const size_t lens[], string& out);
|
2021-01-05 17:48:39 +08:00
|
|
|
|
|
2021-01-09 10:33:51 +08:00
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Э<EFBFBD>鲢<EFBFBD>洢<EFBFBD><EFBFBD> redis_command <EFBFBD>У<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱʹ<EFBFBD><EFBFBD>
|
|
|
|
|
* @param argc {size_t} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argv {const char* []} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2023-02-20 17:45:32 +08:00
|
|
|
|
* @param lens {const size_t []} ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2021-01-09 10:33:51 +08:00
|
|
|
|
*/
|
2023-02-20 17:45:32 +08:00
|
|
|
|
void build_request(size_t argc, const char* argv[], const size_t lens[]);
|
2021-01-09 10:33:51 +08:00
|
|
|
|
|
2015-01-20 00:10:17 +08:00
|
|
|
|
protected:
|
2016-11-18 21:45:40 +08:00
|
|
|
|
const redis_result* run(size_t nchild = 0, int* timeout = NULL);
|
2015-01-23 17:23:04 +08:00
|
|
|
|
|
2021-01-03 22:33:50 +08:00
|
|
|
|
void clear_request(void);
|
2015-01-23 17:23:04 +08:00
|
|
|
|
const redis_result** scan_keys(const char* cmd, const char* key,
|
|
|
|
|
int& cursor, size_t& size, const char* pattern,
|
|
|
|
|
const size_t* count);
|
2020-07-16 10:43:00 +08:00
|
|
|
|
const redis_result** scan_keys(const char* cmd, const char* key,
|
|
|
|
|
size_t klen, int& cursor, size_t& size, const char* pattern,
|
|
|
|
|
const size_t* count);
|
2015-03-29 19:27:41 +08:00
|
|
|
|
|
2015-02-13 22:52:43 +08:00
|
|
|
|
/*******************************************************************/
|
|
|
|
|
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const std::map<string, string>& attrs);
|
2020-07-16 10:43:00 +08:00
|
|
|
|
void build(const char* cmd, const char* key, size_t klen,
|
|
|
|
|
const std::map<string, string>& attrs);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const std::map<string, const char*>& attrs);
|
|
|
|
|
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const std::vector<string>& names,
|
|
|
|
|
const std::vector<string>& values);
|
2020-07-16 10:43:00 +08:00
|
|
|
|
void build(const char* cmd, const char* key, size_t klen,
|
|
|
|
|
const std::vector<string>& names,
|
|
|
|
|
const std::vector<string>& values);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const std::vector<const char*>& names,
|
|
|
|
|
const std::vector<const char*>& values);
|
|
|
|
|
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const char* names[], const char* values[], size_t argc);
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const int names[], const char* values[], size_t argc);
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const char* names[], const size_t names_len[],
|
|
|
|
|
const char* values[], const size_t values_len[], size_t argc);
|
2020-07-16 10:43:00 +08:00
|
|
|
|
void build(const char* cmd, const char* key, size_t klen,
|
|
|
|
|
const char* names[], const size_t names_len[],
|
|
|
|
|
const char* values[], const size_t values_len[], size_t argc);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
|
|
|
|
|
/*******************************************************************/
|
|
|
|
|
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const std::vector<string>& names);
|
2020-07-16 10:43:00 +08:00
|
|
|
|
void build(const char* cmd, const char* key, size_t klen,
|
|
|
|
|
const std::vector<string>& names);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const std::vector<const char*>& names);
|
2015-04-02 22:19:57 +08:00
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const std::vector<int>& names);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const char* names[], size_t argc);
|
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const char* names[], const size_t lens[], size_t argc);
|
2020-07-16 10:43:00 +08:00
|
|
|
|
void build(const char* cmd, const char* key, size_t klen,
|
|
|
|
|
const char* names[], const size_t lens[], size_t argc);
|
2015-04-02 22:19:57 +08:00
|
|
|
|
void build(const char* cmd, const char* key,
|
|
|
|
|
const int names[], size_t argc);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
|
2018-11-06 00:03:52 +08:00
|
|
|
|
/*******************************************************************/
|
|
|
|
|
|
2015-02-13 22:52:43 +08:00
|
|
|
|
protected:
|
|
|
|
|
int get_number(bool* success = NULL);
|
|
|
|
|
long long int get_number64(bool* success = NULL);
|
|
|
|
|
int get_number(std::vector<int>& out);
|
|
|
|
|
int get_number64(std::vector<long long int>& out);
|
|
|
|
|
bool check_status(const char* success = "OK");
|
|
|
|
|
|
|
|
|
|
int get_status(std::vector<bool>& out);
|
2021-01-03 22:33:50 +08:00
|
|
|
|
const char* get_status(void);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
|
|
|
|
|
int get_string(string& buf);
|
|
|
|
|
int get_string(string* buf);
|
|
|
|
|
int get_string(char* buf, size_t size);
|
|
|
|
|
int get_strings(std::vector<string>& result);
|
|
|
|
|
int get_strings(std::vector<string>* result);
|
2015-04-02 22:19:57 +08:00
|
|
|
|
int get_strings(std::list<string>& result);
|
|
|
|
|
int get_strings(std::list<string>* result);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
int get_strings(std::map<string, string>& result);
|
|
|
|
|
int get_strings(std::vector<string>& names,
|
|
|
|
|
std::vector<string>& values);
|
|
|
|
|
int get_strings(std::vector<const char*>& names,
|
|
|
|
|
std::vector<const char*>& values);
|
|
|
|
|
|
|
|
|
|
/************************** common *********************************/
|
|
|
|
|
protected:
|
2016-01-17 13:35:12 +08:00
|
|
|
|
dbuf_pool* dbuf_;
|
2015-02-13 22:52:43 +08:00
|
|
|
|
|
2020-07-20 11:21:47 +08:00
|
|
|
|
private:
|
|
|
|
|
void init(void);
|
|
|
|
|
|
|
|
|
|
public:
|
2021-01-09 14:08:40 +08:00
|
|
|
|
// compute hash slot of the given key and store it in the current
|
|
|
|
|
// redis command will be used in the next operation for redis cluster.
|
|
|
|
|
void hash_slot(const char* key);
|
|
|
|
|
void hash_slot(const char* key, size_t len);
|
|
|
|
|
|
|
|
|
|
// get the current hash slot stored internal
|
2020-07-20 11:21:47 +08:00
|
|
|
|
int get_slot(void) const {
|
|
|
|
|
return slot_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool is_check_addr(void) const {
|
|
|
|
|
return check_addr_;
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-06 00:03:52 +08:00
|
|
|
|
protected:
|
2016-12-15 13:39:26 +08:00
|
|
|
|
bool check_addr_;
|
2022-04-16 10:59:22 +08:00
|
|
|
|
char addr_[128];
|
2015-02-13 22:52:43 +08:00
|
|
|
|
redis_client* conn_;
|
2015-04-02 22:19:57 +08:00
|
|
|
|
redis_client_cluster* cluster_;
|
2020-07-20 11:21:47 +08:00
|
|
|
|
redis_client_pipeline* pipeline_;
|
2016-12-15 13:39:26 +08:00
|
|
|
|
int slot_;
|
|
|
|
|
int redirect_max_;
|
|
|
|
|
int redirect_sleep_;
|
2015-02-13 22:52:43 +08:00
|
|
|
|
|
2020-07-20 11:21:47 +08:00
|
|
|
|
public:
|
2015-03-01 23:50:53 +08:00
|
|
|
|
const char* get_addr(const char* info);
|
2023-03-31 21:51:45 +08:00
|
|
|
|
static const char* get_addr(dbuf_pool* dbuf, const char* info);
|
2015-05-06 21:37:11 +08:00
|
|
|
|
void set_client_addr(const char* addr);
|
|
|
|
|
void set_client_addr(redis_client& conn);
|
2015-02-14 01:01:29 +08:00
|
|
|
|
|
2020-07-20 11:21:47 +08:00
|
|
|
|
public:
|
|
|
|
|
redis_request* get_request_obj(void) const {
|
|
|
|
|
return request_obj_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string* get_request_buf(void) const {
|
|
|
|
|
return request_buf_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool is_slice_req(void) const {
|
|
|
|
|
return slice_req_;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-22 16:02:21 +08:00
|
|
|
|
// get pipeline message bound with the current command
|
2021-01-01 20:35:07 +08:00
|
|
|
|
redis_pipeline_message& get_pipeline_message(void);
|
|
|
|
|
|
2018-11-06 00:03:52 +08:00
|
|
|
|
protected:
|
2015-02-13 22:52:43 +08:00
|
|
|
|
/************************** request ********************************/
|
|
|
|
|
bool slice_req_;
|
|
|
|
|
string* request_buf_;
|
|
|
|
|
redis_request* request_obj_;
|
|
|
|
|
size_t argv_size_;
|
|
|
|
|
const char** argv_;
|
|
|
|
|
size_t* argv_lens_;
|
|
|
|
|
size_t argc_;
|
|
|
|
|
|
2021-01-09 10:33:51 +08:00
|
|
|
|
// reserve the argv space with the specified value at least
|
2015-02-13 22:52:43 +08:00
|
|
|
|
void argv_space(size_t n);
|
2021-01-09 10:33:51 +08:00
|
|
|
|
|
|
|
|
|
// build request in one request buffer
|
2023-02-20 17:45:32 +08:00
|
|
|
|
void build_request1(size_t argc, const char* argv[], const size_t lens[]);
|
2021-01-09 10:33:51 +08:00
|
|
|
|
|
|
|
|
|
// build request with slice request obj
|
2023-02-20 17:45:32 +08:00
|
|
|
|
void build_request2(size_t argc, const char* argv[], const size_t lens[]);
|
2015-02-13 22:52:43 +08:00
|
|
|
|
|
2018-11-06 00:03:52 +08:00
|
|
|
|
protected:
|
2015-02-13 22:52:43 +08:00
|
|
|
|
/************************** respond ********************************/
|
|
|
|
|
bool slice_res_;
|
2021-01-01 20:35:07 +08:00
|
|
|
|
redis_pipeline_message* pipe_msg_;
|
2015-02-13 22:52:43 +08:00
|
|
|
|
const redis_result* result_;
|
2016-01-17 13:35:12 +08:00
|
|
|
|
|
2021-01-09 10:33:51 +08:00
|
|
|
|
// save the error info into log
|
2016-01-17 13:35:12 +08:00
|
|
|
|
void logger_result(const redis_result* result);
|
2015-01-20 00:10:17 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace acl
|
2019-05-18 21:19:21 +08:00
|
|
|
|
|
2019-05-19 16:54:20 +08:00
|
|
|
|
#endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
|