Modules: Hash type API WIP #1.

This commit is contained in:
antirez
2016-04-25 15:39:33 +02:00
parent 5bf5fd24c6
commit 10993ca0d5
4 changed files with 212 additions and 6 deletions

View File

@ -1414,6 +1414,10 @@ unsigned long setTypeSize(robj *subject);
void setTypeConvert(robj *subject, int enc);
/* Hash data type */
#define HASH_SET_TAKE_FIELD (1<<0)
#define HASH_SET_TAKE_VALUE (1<<1)
#define HASH_SET_COPY 0
void hashTypeConvert(robj *o, int enc);
void hashTypeTryConversion(robj *subject, robj **argv, int start, int end);
void hashTypeTryObjectEncoding(robj *subject, robj **o1, robj **o2);
@ -1432,6 +1436,7 @@ void hashTypeCurrentObject(hashTypeIterator *hi, int what, unsigned char **vstr,
sds hashTypeCurrentObjectNewSds(hashTypeIterator *hi, int what);
robj *hashTypeLookupWriteOrCreate(client *c, robj *key);
robj *hashTypeGetValueObject(robj *o, sds field);
int hashTypeSet(robj *o, sds field, sds value, int flags);
/* Pub / Sub */
int pubsubUnsubscribeAllChannels(client *c, int notify);