blob: a861811e465232f8dad620878b2c78d749cbb713 (
plain)
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
|
#ifndef __ZSET_H__
#define __ZSET_H__
#include "redis.h"
#define ZR_LONG 1
#define ZR_STRING 2
struct zipresult {
double score;
union {
long long v;
sds s;
} val;
double distance; /* distance is in meters */
char type; /* access type for the union */
};
/* Redis DB Access */
list *geozrangebyscore(robj *zobj, double min, double max, int limit);
/* New list operation: append one list to another */
void listJoin(list *join_to, list *join);
/* Helpers for returning zrangebyscore results */
struct zipresult *result_str(double score, unsigned char *str, int len);
struct zipresult *result_long(double score, long long v);
void free_zipresult(struct zipresult *r);
#endif
|