SDK
SDK PHP v3.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

zrevrangebylex #

Identical to zrangebylex except that the sorted set is traversed in descending order.

[Redis documentation]


zrevrangebylex(key, min, max, [options], [callback]) #

ArgumentsTypeDescription
keystringKey identifier
minstringMinimum member value (inclusive by default)
maxstringMaximum member value (inclusive by default)
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options #

OptionTypeDescriptionDefault
limitarrayLimit the result set to a range of matching elements (similar to SELECT LIMIT offset, count in SQL).
Format: [<offset(int)>, <count(int)>]
null
queuablebooleanMake this request queuable or nottrue

Return Value #

Returns the MemoryStorage object to allow chaining.


Callback Response #

Returns an array of matching members.

Usage #

<?php
use \Kuzzle\Kuzzle;
$kuzzle = new Kuzzle('localhost');
try {
  $members = $kuzzle->memoryStorage()->zrevrangebylex('key', '-', '(g');
}
catch (ErrorException $e) {
}

Callback response:

["member1", "member2", "..."]