-
Notifications
You must be signed in to change notification settings - Fork 4
/
resolving.h
51 lines (43 loc) · 1.05 KB
/
resolving.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <stdlib.h>
#include "redisk.h"
#define RK_DO_PROTO(name) int rk_do_ ## \
name(rk_skel_t *skel, int argc, char *argv[], size_t *args, int *rsiz, char **rbuf)
struct rk_cmd_desc {
char *name;
int (*fun)(rk_skel_t *skel, int argc, char *argv[], size_t *args, int *rsiz, char **rbuf);
int arity;
};
int resolve(rk_skel_t *skel, int argc, char *argv[], size_t *args, int *rsiz, char **rbuf);
/** Keys commands */
RK_DO_PROTO(del);
RK_DO_PROTO(exists);
RK_DO_PROTO(type);
/** Strings commands */
RK_DO_PROTO(get);
RK_DO_PROTO(set);
RK_DO_PROTO(setnx);
RK_DO_PROTO(incr);
RK_DO_PROTO(decr);
RK_DO_PROTO(incrby);
RK_DO_PROTO(decrby);
RK_DO_PROTO(getset);
/** Hashes commands */
RK_DO_PROTO(hget);
RK_DO_PROTO(hset);
RK_DO_PROTO(hdel);
RK_DO_PROTO(hsetnx);
RK_DO_PROTO(hexists);
RK_DO_PROTO(hlen);
/** Sets commands */
RK_DO_PROTO(sadd);
RK_DO_PROTO(srem);
RK_DO_PROTO(scard);
RK_DO_PROTO(sismember);
RK_DO_PROTO(smembers);
/** Lists commands */
RK_DO_PROTO(llen);
RK_DO_PROTO(lpush);
RK_DO_PROTO(rpush);
RK_DO_PROTO(lpop);
RK_DO_PROTO(rpop);
RK_DO_PROTO(lrange);