scan key_start key_end limit

List key-value pairs with keys in range (key_start, key_end].

("", ""] means no range limit.

This command can do wildchar * like search, but only prefix search, and the * char must never occur in key_start and key_end!

Parameters

Return Value

false on error, otherwise an associative array containing the key-value pairs.

Example

ssdb 127.0.0.1:8888> scan "" "" 10
key             value
-------------------------
  a               : 1
  aa              : 1
  b               : 2
  c               : 3
2 result(s) (0.000 sec)
ssdb 127.0.0.1:8888> scan "a" "" 10
key             value
-------------------------
  aa              : 1
  b               : 2
  c               : 3
2 result(s) (0.000 sec)
# because key_end is not set, 'b', 'c' are returned!
ssdb 127.0.0.1:8888> scan "a" "b" 10
key             value
-------------------------
  aa              : 1
  b               : 2
2 result(s) (0.000 sec)
# set key_end as 'b'(inclusive), so 'b' is returned! 'c' is not.