mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 17:21:20 +00:00
Streams: XLEN command.
This commit is contained in:
@ -378,3 +378,12 @@ void xrangeCommand(client *c) {
|
||||
s = o->ptr;
|
||||
streamReplyWithRange(c,s,&startid,&endid,count);
|
||||
}
|
||||
|
||||
/* XLEN */
|
||||
void xlenCommand(client *c) {
|
||||
robj *o;
|
||||
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL
|
||||
|| checkType(c,o,OBJ_STREAM)) return;
|
||||
stream *s = o->ptr;
|
||||
addReplyLongLong(c,s->length);
|
||||
}
|
||||
|
Reference in New Issue
Block a user