2 #include "../acl_cpp_define.hpp" 7 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) 54 bool set(
const char* key,
const char* value);
55 bool set(
const char* key,
size_t key_len,
56 const char* value,
size_t value_len);
58 #define SETFLAG_EX 0x02 59 #define SETFLAG_PX 0x03 60 #define SETFLAG_NX 0x08 61 #define SETFLAG_XX 0x0C 87 bool set(
const char* key,
const char* value,
int timeout,
int flag);
88 bool set(
const char* key,
size_t key_len,
const char* value,
89 size_t value_len,
int timeout,
int flag);
106 bool setex(
const char* key,
const char* value,
int timeout);
107 bool setex(
const char* key,
size_t key_len,
const char* value,
108 size_t value_len,
int timeout);
125 bool psetex(
const char* key,
const char* value,
int timeout);
126 bool psetex(
const char* key,
size_t key_len,
const char* value,
127 size_t value_len,
int timeout);
146 int setnx(
const char* key,
const char* value);
147 int setnx(
const char* key,
size_t key_len,
148 const char* value,
size_t value_len);
162 int append(
const char* key,
const char* value);
163 int append(
const char* key,
const char* value,
size_t size);
178 bool get(
const char* key,
size_t len,
string& buf);
179 bool get(
const char* key,
string& buf);
189 const redis_result* get(
const char* key);
190 const redis_result* get(
const char* key,
size_t len);
205 bool getset(
const char* key,
const char* value,
string& buf);
206 bool getset(
const char* key,
size_t key_len,
const char* value,
207 size_t value_len,
string& buf);
225 int get_strlen(
const char* key);
226 int get_strlen(
const char* key,
size_t key_len);
242 int setrange(
const char* key,
unsigned offset,
const char* value);
243 int setrange(
const char* key,
size_t key_len,
unsigned offset,
244 const char* value,
size_t value_len);
262 bool getrange(
const char* key,
int start,
int end,
string& buf);
263 bool getrange(
const char* key,
size_t key_len,
264 int start,
int end,
string& buf);
281 bool setbit_(
const char* key,
unsigned offset,
bool bit);
282 bool setbit_(
const char* key,
size_t len,
unsigned offset,
bool bit);
298 bool getbit(
const char* key,
unsigned offset,
int& bit);
299 bool getbit(
const char* key,
size_t len,
unsigned offset,
int& bit);
311 int bitcount(
const char* key);
312 int bitcount(
const char* key,
size_t len);
313 int bitcount(
const char* key,
int start,
int end);
314 int bitcount(
const char* key,
size_t len,
int start,
int end);
327 int bitop_and(
const char* destkey,
const std::vector<string>& keys);
328 int bitop_and(
const char* destkey,
const std::vector<const char*>& keys);
329 int bitop_and(
const char* destkey,
const char* key, ...);
330 int bitop_and(
const char* destkey,
const char* keys[],
size_t size);
342 int bitop_or(
const char* destkey,
const std::vector<string>& keys);
343 int bitop_or(
const char* destkey,
const std::vector<const char*>& keys);
344 int bitop_or(
const char* destkey,
const char* key, ...);
345 int bitop_or(
const char* destkey,
const char* keys[],
size_t size);
357 int bitop_xor(
const char* destkey,
const std::vector<string>& keys);
358 int bitop_xor(
const char* destkey,
const std::vector<const char*>& keys);
359 int bitop_xor(
const char* destkey,
const char* key, ...);
360 int bitop_xor(
const char* destkey,
const char* keys[],
size_t size);
372 bool mset(
const std::map<string, string>& objs);
373 bool mset(
const std::vector<string>& keys,
374 const std::vector<string>& values);
375 bool mset(
const char* keys[],
const char* values[],
size_t argc);
376 bool mset(
const char* keys[],
const size_t keys_len[],
377 const char* values[],
const size_t values_len[],
size_t argc);
395 int msetnx(
const std::map<string, string>& objs);
396 int msetnx(
const std::vector<string>& keys,
397 const std::vector<string>& values);
398 int msetnx(
const char* keys[],
const char* values[],
size_t argc);
399 int msetnx(
const char* keys[],
const size_t keys_len[],
400 const char* values[],
const size_t values_len[],
size_t argc);
445 bool mget(
const std::vector<string>& keys,
446 std::vector<string>* out = NULL);
447 bool mget(
const std::vector<const char*>& keys,
448 std::vector<string>* out = NULL);
450 bool mget(std::vector<string>* result,
const char* first_key, ...);
451 bool mget(
const char* keys[],
size_t argc,
452 std::vector<string>* out = NULL);
453 bool mget(
const char* keys[],
const size_t keys_len[],
size_t argc,
454 std::vector<string>* out = NULL);
474 bool incr(
const char* key,
long long int* result = NULL);
494 bool incrby(
const char* key,
long long int inc,
495 long long int* result = NULL);
515 bool incrbyfloat(
const char* key,
double inc,
double* result = NULL);
533 bool decr(
const char* key,
long long int* result = NULL);
550 bool decrby(
const char* key,
long long int dec,
551 long long int* result = NULL);
554 int bitop(
const char* op,
const char* destkey,
555 const std::vector<string>& keys);
556 int bitop(
const char* op,
const char* destkey,
557 const std::vector<const char*>& keys);
558 int bitop(
const char* op,
const char* destkey,
559 const char* keys[],
size_t size);
561 bool incoper(
const char* cmd,
const char* key,
long long int* inc,
562 long long int* result);
568 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) #define ACL_CPP_DEPRECATED