acl/lib_acl_cpp/include/acl_cpp/redis/redis_zset.hpp

573 lines
24 KiB
C++
Raw Normal View History

#pragma once
2017-06-02 14:47:24 +08:00
#include "../acl_cpp_define.hpp"
#include <vector>
#include <map>
#include <utility>
2017-06-02 14:47:24 +08:00
#include "redis_command.hpp"
#if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
namespace acl
{
class redis_client;
class ACL_CPP_API redis_zset : virtual public redis_command
{
public:
2015-03-29 19:27:41 +08:00
/**
* see redis_command::redis_command()
*/
redis_zset(void);
2015-03-29 19:27:41 +08:00
/**
* see redis_command::redis_command(redis_client*)
*/
redis_zset(redis_client* conn);
2015-03-29 19:27:41 +08:00
/**
2016-05-22 09:10:34 +08:00
* see redis_command::redis_command(redis_client_cluster*, size_t)
2015-03-29 19:27:41 +08:00
*/
redis_zset(redis_client_cluster* cluster, size_t max_conns = 0);
virtual ~redis_zset(void);
/////////////////////////////////////////////////////////////////////
/**
* <EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD>Ӧ key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* add one or more members to a sorted set, or update its score if
* it already exists
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* the key of a sorted set
* @param members "<EFBFBD><EFBFBD>ֵ-<2D><>Ա"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the set storing values and stores
* @return {int} <EFBFBD>³ɹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD> "<EFBFBD><EFBFBD>ֵ-<2D><>Ա" <EFBFBD>Ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the number of elements added to the sorted set, not including
* elements already existing for which the score was updated
* 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>
* nothing was added to the sorted set
* -1<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯶<EFBFBD><EFBFBD><EFBFBD>
* error or it was not a sorted set by the key
* >0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the number of elements added
*/
int zadd(const char* key, const std::map<string, double>& members,
const std::vector<string>* options = NULL);
int zadd(const char* key,
2015-01-27 17:52:50 +08:00
const std::vector<std::pair<string, double> >&members);
int zadd(const char* key,
2015-01-27 17:52:50 +08:00
const std::vector<std::pair<const char*, double> >&members);
int zadd(const char* key, const std::vector<string>& members,
const std::vector<double>& scores);
int zadd(const char* key, const std::vector<const char*>& members,
const std::vector<double>& scores);
int zadd(const char* key, const char* members[], double scores[],
size_t size);
int zadd(const char* key, const char* members[], size_t members_len[],
double scores[], size_t size);
int zadd_with_ch_xx(const char* key, const std::map<string, double>& members);
int zadd_with_ch_nx(const char* key, const std::map<string, double>& members);
bool zadd_with_incr(const char* key, const char* member, size_t len,
double score, double* result = NULL, const char* option = NULL);
bool zadd_with_incr(const char* key, const char* member,
double score, double* result = NULL, const char* option = NULL);
bool zadd_with_incr_xx(const char* key, const char* member,
double score, double* result = NULL);
bool zadd_with_incr_nx(const char* key, const char* member,
double score, double* result = NULL);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯵ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* get the number of elements in a sorted set
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* the key of a a sorted set
* @return {int} һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯵ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the number of elements of the sorted set
* 0<EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the key doesn't exist
* -1<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>
* error or it wasn't a sorted set by the key
* >0<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>еij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the number of elements in the sorted set
*/
int zcard(const char* key);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>
* get the number of elements in a sorted set with scores within
* the given values
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* the key of a sorted set
* @param min {double} <EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ֵ
* the min score specified
* @param max {double} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* the max socre specified
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the number of elements in specified score range
* 0<EFBFBD><EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><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>
* nothing in the specified score range, or the key doesn't exist
* -1: <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>
* error or it is not a sorted set by the key
*/
int zcount(const char* key, double min, double max);
/**
* <EFBFBD><EFBFBD> key <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> inc
* increase the score of a memeber in a sorted set
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* the key of the sorted set
* @param inc {double} <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* the value to be increased
* @param member {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD>
* the specified memeber of a sorted set
* @param result {double*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* if not null, it will store the score result after increment
* @return {bool} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>ɹ<EFBFBD>
* if successful about the operation
*/
bool zincrby(const char* key, double inc, const char* member,
double* result = NULL);
bool zincrby(const char* key, double inc, const char* member,
size_t len, double* result = NULL);
/**
* <EFBFBD><EFBFBD> key <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><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* get the specified range memebers of a sorted set sotred at key
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* the key of a sorted set
* @param start {int} <EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>
* the begin index of the sorted set
* @param stop {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>
* the end index of the sorted set
* @param result {std::vector<string>*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD>ȵ<EFBFBD><EFBFBD><EFBFBD>
* result.clear() <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>Ԫ<EFBFBD><EFBFBD>
* if not NULL, it will store the memebers result
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the number of memebers
* 0: <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ջ<EFBFBD> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the result is empty or the key doesn't exist
* -1: <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯶<EFBFBD><EFBFBD><EFBFBD>
* error or it's not a sorted set by the key
* >0: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* the number of the memebers result
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD>0 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>1 <EFBFBD><EFBFBD>ʾ<EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>
* -2 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Notice: about the index, element by index 0 is the first
* of the sorted set, element by index -1 is the last one.
2015-01-30 22:58:13 +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>
* when success, the result can be got by one of the below proccess:
* 1<EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿյĴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ַ
* the most easily way is to set a non-NULL result parameter
* for this function
* 2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_value <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* get the specified subscript's element by redis_command::get_value
* 3<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_child <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>(redis_result<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>
* redis_result::argv_to_string <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* redis_result::argv_to_string <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* get redis_result object with the given subscript, and get the
* element by redis_result::argv_to_string
* 4<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_result <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis_result<EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>
* redis_result::get_child <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ 2 <EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* <EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD>Ԫ<EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* get redis_result object by redis_command::get_result, and get
* the first element by redis_result::get_child, then get the
* element by the way same as the way 2 above.
* 5<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_children <EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> redis_result <EFBFBD><EFBFBD>
* <EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD> argv_to_string <EFBFBD><EFBFBD>ÿһ<EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* get child array by redis_command::get_children, and get the
* element from one of redis_result array by argv_to_string
*/
int zrange(const char* key, int start, int stop,
2015-01-30 22:58:13 +08:00
std::vector<string>* result);
/**
* <EFBFBD><EFBFBD> key <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><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param start {int} <EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>
* @param stop {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>
* @param out <EFBFBD> "<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>-<2D><>ֵ<EFBFBD><D6B5>"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD>ȵ<EFBFBD><EFBFBD><EFBFBD> out.clear()
* @return {int} <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> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* -1: <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>0 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>1 <EFBFBD><EFBFBD>ʾ<EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>
* -2 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrange_with_scores(const char* key, int start, int stop,
std::vector<std::pair<string, double> >& out);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯳<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param min {double} <EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ֵ
* @param max {double} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @param out {std::vector<string>*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param offset {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>
* @param count {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ȡ<EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <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> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* -1: <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>offset <EFBFBD><EFBFBD> count <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱΪ<EFBFBD>ǿ<EFBFBD>ָ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
2015-01-30 22:58:13 +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>
* 1<EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿյĴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ַ
* 2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_value <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 3<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_child <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>(redis_result<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>
* redis_result::argv_to_string <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 4<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_result <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis_result<EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>
* redis_result::get_child <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ 2 <EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* <EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD>Ԫ<EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 5<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_children <EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> redis_result <EFBFBD><EFBFBD>
* <EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD> argv_to_string <EFBFBD><EFBFBD>ÿһ<EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrangebyscore(const char* key, double min, double max,
2015-01-30 22:58:13 +08:00
std::vector<string>* out, const int* offset = NULL,
const int* count = NULL);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯳<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param min {const char*} <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ֵ
* @param max {const char*} <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @param out {std::vector<string>*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param offset {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>
* @param count {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ȡ<EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <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> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* -1: <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>
* 1<EFBFBD><EFBFBD>offset <EFBFBD><EFBFBD> count <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱΪ<EFBFBD>ǿ<EFBFBD>ָ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* 2<EFBFBD><EFBFBD>min <EFBFBD><EFBFBD> max <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -inf <EFBFBD><EFBFBD> +inf <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 3<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><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD>
* 3.1<EFBFBD><EFBFBD>"ZRANGEBYSCORE zset (1 5" <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 < score <= 5 <EFBFBD>ij<EFBFBD>Ա
* 3.2<EFBFBD><EFBFBD>"ZRANGEBYSCORE zset (5 (10" <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 < score < 10 <EFBFBD>ij<EFBFBD>Ա
2015-01-30 22:58:13 +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>
* 1<EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿյĴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>ַ
* 2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_value <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 3<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_child <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD>(redis_result<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>
* redis_result::argv_to_string <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 4<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_result <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> redis_result<EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>
* redis_result::get_child <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ 2 <EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>
* <EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD>Ԫ<EFBFBD>ص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 5<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> get_children <EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD> redis_result <EFBFBD><EFBFBD>
* <EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD> argv_to_string <EFBFBD><EFBFBD>ÿһ<EFBFBD><EFBFBD>Ԫ<EFBFBD>ض<EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrangebyscore(const char* key, const char* min, const char* max,
2015-01-30 22:58:13 +08:00
std::vector<string>* out, const int* offset = NULL,
const int* count = NULL);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯳<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD>ֵ(min/max)ʹ<EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
* @param out <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD>ȵ<EFBFBD><EFBFBD><EFBFBD> out.clear()
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrangebyscore_with_scores(const char* key, double min, double max,
std::vector<std::pair<string, double> >& out,
const int* offset = NULL, const int* count = NULL);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯳<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD>ֵ(min/max)ʹ<EFBFBD><EFBFBD>
* <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
* @param out <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD>ȵ<EFBFBD><EFBFBD><EFBFBD> out.clear()
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrangebyscore_with_scores(const char* key, const char* min,
const char* max, std::vector<std::pair<string, double> >& out,
const int* offset = NULL, const int* count = NULL);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>г<EFBFBD>Ա member <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> score
* ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)˳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param member {const char*} <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>
* @param len {size_t} member <EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>-1 -- <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>
*/
int zrank(const char* key, const char* member, size_t len);
int zrank(const char* key, const char* member);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param first_member {const char*} Ҫɾ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD>б<EFBFBD><EFBFBD>ĵ<EFBFBD>һ<EFBFBD><EFBFBD>
* @return {int} <EFBFBD>ɹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>> 0 <EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrem(const char* key, const char* first_member, ...);
int zrem(const char* key, const std::vector<string>& members);
int zrem(const char* key, const std::vector<const char*>& members);
int zrem(const char* key, const char* members[], const size_t lens[],
size_t argc);
/**
* <EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(rank)<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> start <EFBFBD><EFBFBD> stop ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> start <EFBFBD><EFBFBD> stop <EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>
* <EFBFBD>±<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> start <EFBFBD><EFBFBD> stop <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0 Ϊ<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> 1 <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> -1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> -2 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param start {int} <EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD> 0 <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
* @param stop {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 0<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* -1<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯺϶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
*/
int zremrangebyrank(const char* key, int start, int stop);
/**
* <EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>԰2.1.6<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max <EFBFBD>ij<EFBFBD>ԱҲ<EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD> ZRANGEBYSCORE <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param min {double} <EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ֵ
* @param max {double} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @return {int} <EFBFBD>ɹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>> 0 <EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zremrangebyscore(const char* key, double min, double max);
/**
* <EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>԰2.1.6<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max <EFBFBD>ij<EFBFBD>ԱҲ<EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD> ZRANGEBYSCORE <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param min {const char*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><EFBFBD><EFBFBD>zrangebyscore ע<EFBFBD><EFBFBD>
* @param max {const char*} <EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @return {int} <EFBFBD>ɹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>> 0 <EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD>ɾ<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zremrangebyscore(const char* key, const char* min, const char* max);
/**
* <EFBFBD><EFBFBD> key <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><EFBFBD>ֵ<EFBFBD>ݼ<EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param start {int} <EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>
* @param stop {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>
* @param result {std::vector<string>*} <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>1 <EFBFBD><EFBFBD>ʾ<EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>
* -2 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrevrange(const char* key, int start, int stop,
2015-01-30 22:58:13 +08:00
std::vector<string>* result);
/**
* <EFBFBD><EFBFBD> key <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><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>ݼ<EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param start {int} <EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>
* @param stop {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>ã<EFBFBD>
* @param out <EFBFBD> "<EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>-<2D><>ֵ<EFBFBD><D6B5>"<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD>ȵ<EFBFBD><EFBFBD><EFBFBD> out.clear()
* ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>±<EFBFBD>λ<EFBFBD>ã<EFBFBD>0 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>1 <EFBFBD><EFBFBD>ʾ<EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>
* -2 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrevrange_with_scores(const char* key, int start, int stop,
std::vector<std::pair<string, double> >& out);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯳<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD>8<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param min {const char*} <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD>ֵ
* @param max {const char*} <EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @param out {std::vector<string>*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param offset {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD>±<EFBFBD>
* @param count {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ȡ<EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <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> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* -1: <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>
* 1<EFBFBD><EFBFBD>offset <EFBFBD><EFBFBD> count <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱΪ<EFBFBD>ǿ<EFBFBD>ָ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч
* 2<EFBFBD><EFBFBD>min <EFBFBD><EFBFBD> max <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -inf <EFBFBD><EFBFBD> +inf <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* 3<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><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD>
* 3.1<EFBFBD><EFBFBD>"ZRANGEBYSCORE zset (1 5" <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 < score <= 5 <EFBFBD>ij<EFBFBD>Ա
* 3.2<EFBFBD><EFBFBD>"ZRANGEBYSCORE zset (5 (10" <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 5 < score < 10 <EFBFBD>ij<EFBFBD>Ա
*/
2016-10-27 21:25:14 +08:00
//int zrevrangebyscore(const char* key, const char* min, const char* max,
// std::vector<string>* out, const int* offset = NULL,
// const int* count = NULL);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max )
* <EFBFBD>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯳<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ<EFBFBD>ݼ<EFBFBD>(<EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD>ֵ(min/max)ʹ<EFBFBD><EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
* @param out <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> out.clear()
* @param count {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>ȡ<EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zrevrangebyscore_with_scores(const char* key, double min,
double max, std::vector<std::pair<string, double> >& out,
const int* offset = NULL, const int* count = NULL);
int zrevrangebyscore_with_scores(const char* key, const char* min,
const char* max, std::vector<std::pair<string, double> >& out,
const int* offset = NULL, const int* count = NULL);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>г<EFBFBD>Ա member <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> score
* ֵ<EFBFBD>ݼ<EFBFBD>(<EFBFBD>Ӵ<EFBFBD><EFBFBD><EFBFBD>С)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param member {const char*} <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>
* @param len {size_t} member <EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD>±<EFBFBD>λ<EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>-1 -- <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>
*/
int zrevrank(const char* key, const char* member, size_t len);
int zrevrank(const char* key, const char* member);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <EFBFBD>У<EFBFBD><EFBFBD><EFBFBD>Ա member <EFBFBD><EFBFBD> score ֵ
* @param key {const char*} <EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param member {const char*} <EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>
* @param len {size_t} member <EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>
* @param result {double&} <EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {bool} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> false<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򷵻<EFBFBD> true
*/
bool zscore(const char* key, const char* member, size_t len,
double& result);
bool zscore(const char* key, const char* member, double& result);
/**
* <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> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> numkeys <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>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> score
* ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸ó<EFBFBD>Ա score ֵ֮<EFBFBD><EFBFBD>
* @param dst {const char*} Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯼<EFBFBD>ֵ
* @param keys Դ<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>(multiplication factor)<EFBFBD><EFBFBD>ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD><EFBFBD> score
* ֵ<EFBFBD>ڴ<EFBFBD><EFBFBD>ݸ<EFBFBD><EFBFBD>ۺϺ<EFBFBD><EFBFBD><EFBFBD>(aggregation function)֮ǰ<EFBFBD><EFBFBD>Ҫ<EFBFBD>ȳ<EFBFBD><EFBFBD>Ը<EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD>
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD> WEIGHTS ѡ<EFBFBD><EFBFBD>˷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ 1
* @param aggregate {const char*} <EFBFBD>ۺϷ<EFBFBD>ʽ<EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> SUM <EFBFBD>ۺϷ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD>ۺϷ<EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>
* SUM: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ֮ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>иó<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ
* MIN: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>С score ֵ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>иó<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ
* MAX: <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> score ֵ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>иó<EFBFBD>Ա<EFBFBD><EFBFBD> score ֵ
* @return {int} <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>ij<EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -1 <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zunionstore(const char* dst, const std::map<string, double>& keys,
const char* aggregate = "SUM");
int zunionstore(const char* dst, const std::vector<string>& keys,
const std::vector<double>* weights = NULL,
const char* aggregate = "SUM");
/**
* <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> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> numkeys <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>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD> score
* ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>и<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸ó<EFBFBD>Ա score ֵ֮<EFBFBD><EFBFBD>
* @return {int} <EFBFBD>±<EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯵Ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>Ԫ<EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>Ա)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zinterstore(const char* dst, const std::map<string, double>& keys,
const char* aggregate = "SUM");
int zinterstore(const char* dst, const std::vector<string>& keys,
const std::vector<double>* weights = NULL,
const char* aggregate = "SUM");
2015-01-27 17:52:50 +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>
* @param cursor {int} <EFBFBD>α<EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ֵд 0
* @param out <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><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>
* @param pattern {const char*} ƥ<EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD>glob <EFBFBD><EFBFBD><EFBFBD>񣬷ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>Ч
* @param count {const size_t*} <EFBFBD>޶<EFBFBD><EFBFBD>Ľ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>ָ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>Ч
* @return {int} <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>
* -1: <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> out<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>п<EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>
2015-01-27 17:52:50 +08:00
*/
int zscan(const char* key, int cursor,
std::vector<std::pair<string, double> >& out,
const char* pattern = NULL, const size_t* count = 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>
* <EFBFBD><EFBFBD>lexicographical ordering<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> key <EFBFBD>У<EFBFBD> ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max ֮<EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD>Ա
* @param min {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Сֵ
* @param max {const char*} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
* @param out {std::vector<string>*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @param offset {const int*} <EFBFBD>ǿ<EFBFBD>ʱ<EFBFBD><EFBFBD>Ч<EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡȡ<EFBFBD><EFBFBD><EFBFBD>±<EFBFBD><EFBFBD><EFBFBD>ʼֵ
* @param count {const int*} <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>
* @return {int} <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> key <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* -1: <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> key <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>
* 1<EFBFBD><EFBFBD><EFBFBD>Ϸ<EFBFBD><EFBFBD><EFBFBD> min <EFBFBD><EFBFBD> max <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>Χ֮<EFBFBD>ڣ<EFBFBD>
* 2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ + <EFBFBD><EFBFBD> - <EFBFBD><EFBFBD> min <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD> max <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><EFBFBD>
* ZRANGEBYLEX <zset> - + <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򼯺<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD>
*/
int zrangebylex(const char* key, const char* min, const char* max,
2015-01-30 22:58:13 +08:00
std::vector<string>* out, const int* offset = NULL,
const int* count = NULL);
/**
* <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD>ķ<EFBFBD>ֵ<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> min <EFBFBD><EFBFBD> max <EFBFBD><EFBFBD>Χ<EFBFBD>ڵ<EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zlexcount(const char* key, const char* min, const char* max);
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>г<EFBFBD>Ա<EFBFBD>ķ<EFBFBD>ֵ<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> min <EFBFBD><EFBFBD> max <EFBFBD><EFBFBD>Χ<EFBFBD>ڵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD>
* @return {int} <EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD>Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*/
int zremrangebylex(const char* key, const char* min, const char* max);
int zpopmin(const char* key,
std::vector<std::pair<string, double> >& out, size_t count = 1);
int zpopmax(const char* key,
std::vector<std::pair<string, double> >& out, size_t count = 1);
int bzpopmin(const char* key, size_t timeout, string& member,
double* score = NULL);
int bzpopmax(const char* key, size_t timeout, string& member,
double* score = NULL);
int bzpopmin(const std::vector<string>& keys, size_t timeout,
string& member, double* score = NULL);
int bzpopmax(const std::vector<string>& keys, size_t timeout,
string& member, double* score = NULL);
private:
int zrange_get(const char* cmd, const char* key, int start,
2015-01-30 22:58:13 +08:00
int stop, std::vector<string>* result);
int zrange_get_with_scores(const char* cmd, const char* key, int start,
int stop, std::vector<std::pair<string, double> >& out);
int zrangebyscore_get(const char* cmd, const char* key,
2015-01-30 22:58:13 +08:00
const char* min, const char* max, std::vector<string>* out,
const int* offset = NULL, const int* count = NULL);
int zrangebyscore_get_with_scores(const char* cmd,
const char* key, const char* min, const char* max,
std::vector<std::pair<string, double> >& out,
const int* offset = NULL, const int* count = NULL);
int zstore(const char* cmd, const char* dst,
const std::map<string, double>& keys, const char* aggregate);
int zstore(const char* cmd, const char* dst, const std::vector<string>& keys,
const std::vector<double>* weights, const char* aggregate);
int zpop(const char* cmd, const char* key,
std::vector<std::pair<string, double> >& out, size_t count);
int get_with_scores(std::vector<std::pair<string, double> >& out);
int bzpop(const char* cmd, const char* key, size_t timeout,
string& member, double* score);
int bzpop(const char* cmd, const std::vector<string>& keys,
size_t timeout, string& member, double* score);
int bzpop_result(string& member, double* score);
};
} // namespace acl
#endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)