mirror of https://github.com/ledisdb/ledisdb.git
x must be the prefix for scan, for #121
This commit is contained in:
parent
053da7736c
commit
31fc7f0375
|
@ -1,4 +1,4 @@
|
||||||
//This file was generated by .tools/generate_commands.py on Thu Nov 27 2014 13:42:44 +0800
|
//This file was generated by .tools/generate_commands.py on Sat Jan 24 2015 10:59:30 +0800
|
||||||
package main
|
package main
|
||||||
|
|
||||||
var helpCommands = [][]string{
|
var helpCommands = [][]string{
|
||||||
|
@ -111,8 +111,18 @@ var helpCommands = [][]string{
|
||||||
{"SYNC", "logid", "Replication"},
|
{"SYNC", "logid", "Replication"},
|
||||||
{"TIME", "-", "Server"},
|
{"TIME", "-", "Server"},
|
||||||
{"TTL", "key", "KV"},
|
{"TTL", "key", "KV"},
|
||||||
|
{"XBREVSCAN", "key [MATCH match] [COUNT count]", "Bitmap"},
|
||||||
|
{"XBSCAN", "key [MATCH match] [COUNT count]", "Bitmap"},
|
||||||
|
{"XHREVSCAN", "key [MATCH match] [COUNT count]", "Hash"},
|
||||||
|
{"XHSCAN", "key [MATCH match] [COUNT count]", "Hash"},
|
||||||
|
{"XLREVSCAN", "key [MATCH match] [COUNT count]", "List"},
|
||||||
|
{"XLSCAN", "key [MATCH match] [COUNT count]", "List"},
|
||||||
{"XREVSCAN", "key [MATCH match] [COUNT count]", "KV"},
|
{"XREVSCAN", "key [MATCH match] [COUNT count]", "KV"},
|
||||||
{"XSCAN", "key [MATCH match] [COUNT count]", "KV"},
|
{"XSCAN", "key [MATCH match] [COUNT count]", "KV"},
|
||||||
|
{"XSREVSCAN", "key [MATCH match] [COUNT count]", "Set"},
|
||||||
|
{"XSSCAN", "key [MATCH match] [COUNT count]", "Set"},
|
||||||
|
{"XZREVSCAN", "key [MATCH match] [COUNT count]", "ZSet"},
|
||||||
|
{"XZSCAN", "key [MATCH match] [COUNT count]", "ZSet"},
|
||||||
{"ZADD", "key score member [score member ...]", "ZSet"},
|
{"ZADD", "key score member [score member ...]", "ZSet"},
|
||||||
{"ZCARD", "key", "ZSet"},
|
{"ZCARD", "key", "ZSet"},
|
||||||
{"ZCLEAR", "key", "ZSet"},
|
{"ZCLEAR", "key", "ZSet"},
|
||||||
|
|
|
@ -50,11 +50,11 @@ Transaction API:
|
||||||
LedisDB supplies `xscan`, `xrevscan`, etc, to fetch data iteratively and reverse iteratively.
|
LedisDB supplies `xscan`, `xrevscan`, etc, to fetch data iteratively and reverse iteratively.
|
||||||
|
|
||||||
+ KV: `xscan`, `xrevscan`
|
+ KV: `xscan`, `xrevscan`
|
||||||
+ Hash: `hxscan`, `hxrevscan`
|
+ Hash: `hxscan`, `hxrevscan`, `xhscan`, `xhrevscan`
|
||||||
+ List: `lxscan`, `lxrevscan`
|
+ List: `lxscan`, `lxrevscan`, `xlscan`, `xlrevscan`
|
||||||
+ Set: `sxscan` , `sxrevscan`
|
+ Set: `sxscan` , `sxrevscan`, `xsscan`, `xsrevscan`
|
||||||
+ Zset: `zxscan`, `zxrevscan`
|
+ Zset: `zxscan`, `zxrevscan`, `xzscan`, `xzrevscan`
|
||||||
+ Bitmap: `bxscan`, `bxrevscan`
|
+ Bitmap: `bxscan`, `bxrevscan`, `xbscan`, `xbrevscan`
|
||||||
|
|
||||||
## DUMP
|
## DUMP
|
||||||
|
|
||||||
|
|
|
@ -724,6 +724,66 @@
|
||||||
"readonly": true
|
"readonly": true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"XBSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "Bitmap",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XLSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "List",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XHSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "Hash",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XSSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "Set",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XZSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "ZSet",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XHREVSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "Hash",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XLREVSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "List",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XSREVSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "Set",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XZREVSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "ZSet",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"XBREVSCAN": {
|
||||||
|
"arguments": "key [MATCH match] [COUNT count]",
|
||||||
|
"group": "Bitmap",
|
||||||
|
"readonly": true
|
||||||
|
},
|
||||||
|
|
||||||
"RESTORE": {
|
"RESTORE": {
|
||||||
"arguments" : "key ttl value",
|
"arguments" : "key ttl value",
|
||||||
"group" : "Server",
|
"group" : "Server",
|
||||||
|
|
|
@ -50,6 +50,8 @@ Table of Contents
|
||||||
- [HPERSIST key](#hpersist-key)
|
- [HPERSIST key](#hpersist-key)
|
||||||
- [HXSCAN key [MATCH match] [COUNT count]](#hxscan-key-match-match-count-count)
|
- [HXSCAN key [MATCH match] [COUNT count]](#hxscan-key-match-match-count-count)
|
||||||
- [HXREVSCAN key [MATCH match] [COUNT count]](#hxrevscan-key-match-match-count-count)
|
- [HXREVSCAN key [MATCH match] [COUNT count]](#hxrevscan-key-match-match-count-count)
|
||||||
|
- [XHSCAN key [MATCH match] [COUNT count]](#xhscan-key-match-match-count-count)
|
||||||
|
- [XHREVSCAN key [MATCH match] [COUNT count]](#xhrevscan-key-match-match-count-count)
|
||||||
- [HDUMP key](#hdump-key)
|
- [HDUMP key](#hdump-key)
|
||||||
- [List](#list)
|
- [List](#list)
|
||||||
- [BLPOP key [key ...] timeout](#blpop-key-key--timeout)
|
- [BLPOP key [key ...] timeout](#blpop-key-key--timeout)
|
||||||
|
@ -69,6 +71,8 @@ Table of Contents
|
||||||
- [LPERSIST key](#lpersist-key)
|
- [LPERSIST key](#lpersist-key)
|
||||||
- [LXSCAN key [MATCH match] [COUNT count]](#lxscan-key-match-match-count-count)
|
- [LXSCAN key [MATCH match] [COUNT count]](#lxscan-key-match-match-count-count)
|
||||||
- [LXREVSCAN key [MATCH match] [COUNT count]](#lxrevscan-key-match-match-count-count)
|
- [LXREVSCAN key [MATCH match] [COUNT count]](#lxrevscan-key-match-match-count-count)
|
||||||
|
- [XLSCAN key [MATCH match] [COUNT count]](#xlscan-key-match-match-count-count)
|
||||||
|
- [XLREVSCAN key [MATCH match] [COUNT count]](#xlrevscan-key-match-match-count-count)
|
||||||
- [LDUMP key](#ldump-key)
|
- [LDUMP key](#ldump-key)
|
||||||
- [Set](#set)
|
- [Set](#set)
|
||||||
- [SADD key member [member ...]](#sadd-key-member-member-)
|
- [SADD key member [member ...]](#sadd-key-member-member-)
|
||||||
|
@ -90,6 +94,8 @@ Table of Contents
|
||||||
- [SPERSIST key](#spersist-key)
|
- [SPERSIST key](#spersist-key)
|
||||||
- [SXSCAN key [MATCH match] [COUNT count]](#sxscan-key-match-match-count-count)
|
- [SXSCAN key [MATCH match] [COUNT count]](#sxscan-key-match-match-count-count)
|
||||||
- [SXREVSCAN key [MATCH match] [COUNT count]](#sxrevscan-key-match-match-count-count)
|
- [SXREVSCAN key [MATCH match] [COUNT count]](#sxrevscan-key-match-match-count-count)
|
||||||
|
- [XSSCAN key [MATCH match] [COUNT count]](#xsscan-key-match-match-count-count)
|
||||||
|
- [XSREVSCAN key [MATCH match] [COUNT count]](#xsrevscan-key-match-match-count-count)
|
||||||
- [SDUMP key](#sdump-key)
|
- [SDUMP key](#sdump-key)
|
||||||
- [ZSet](#zset)
|
- [ZSet](#zset)
|
||||||
- [ZADD key score member [score member ...]](#zadd-key-score-member-score-member-)
|
- [ZADD key score member [score member ...]](#zadd-key-score-member-score-member-)
|
||||||
|
@ -118,6 +124,8 @@ Table of Contents
|
||||||
](#zinterstore-destination-numkeys-key-key--weights-weight-weight--aggregate-summinmax)
|
](#zinterstore-destination-numkeys-key-key--weights-weight-weight--aggregate-summinmax)
|
||||||
- [ZXSCAN key [MATCH match] [COUNT count]](#zxscan-key-match-match-count-count)
|
- [ZXSCAN key [MATCH match] [COUNT count]](#zxscan-key-match-match-count-count)
|
||||||
- [ZXREVSCAN key [MATCH match] [COUNT count]](#zxrevscan-key-match-match-count-count)
|
- [ZXREVSCAN key [MATCH match] [COUNT count]](#zxrevscan-key-match-match-count-count)
|
||||||
|
- [XZSCAN key [MATCH match] [COUNT count]](#xzscan-key-match-match-count-count)
|
||||||
|
- [XZREVSCAN key [MATCH match] [COUNT count]](#xzrevscan-key-match-match-count-count)
|
||||||
- [ZRANGEBYLEX key min max [LIMIT offset count]](#zrangebylex-key-min-max-limit-offset-count)
|
- [ZRANGEBYLEX key min max [LIMIT offset count]](#zrangebylex-key-min-max-limit-offset-count)
|
||||||
- [ZREMRANGEBYLEX key min max](#zremrangebylex-key-min-max)
|
- [ZREMRANGEBYLEX key min max](#zremrangebylex-key-min-max)
|
||||||
- [ZLEXCOUNT key min max](#zlexcount-key-min-max)
|
- [ZLEXCOUNT key min max](#zlexcount-key-min-max)
|
||||||
|
@ -135,6 +143,8 @@ Table of Contents
|
||||||
- [BPERSIST key](#bpersist-key)
|
- [BPERSIST key](#bpersist-key)
|
||||||
- [BXSCAN key [MATCH match] [COUNT count]](#bxscan-key-match-match-count-count)
|
- [BXSCAN key [MATCH match] [COUNT count]](#bxscan-key-match-match-count-count)
|
||||||
- [BXREVSCAN key [MATCH match] [COUNT count]](#bxrevscan-key-match-match-count-count)
|
- [BXREVSCAN key [MATCH match] [COUNT count]](#bxrevscan-key-match-match-count-count)
|
||||||
|
- [XBSCAN key [MATCH match] [COUNT count]](#xbscan-key-match-match-count-count)
|
||||||
|
- [XBREVSCAN key [MATCH match] [COUNT count]](#xbrevscan-key-match-match-count-count)
|
||||||
- [Replication](#replication)
|
- [Replication](#replication)
|
||||||
- [SLAVEOF host port [RESTART] [READONLY]](#slaveof-host-port-restart-readonly)
|
- [SLAVEOF host port [RESTART] [READONLY]](#slaveof-host-port-restart-readonly)
|
||||||
- [FULLSYNC [NEW]](#fullsync-new)
|
- [FULLSYNC [NEW]](#fullsync-new)
|
||||||
|
@ -981,6 +991,19 @@ Reverse iterate Hash keys incrementally.
|
||||||
|
|
||||||
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XHSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Iterate Hash keys incrementally.
|
||||||
|
|
||||||
|
See [XSCAN](#xscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XHREVSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Reverse iterate Hash keys incrementally.
|
||||||
|
|
||||||
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
|
||||||
### HDUMP key
|
### HDUMP key
|
||||||
|
|
||||||
See [DUMP](#dump-key) for more information.
|
See [DUMP](#dump-key) for more information.
|
||||||
|
@ -1319,6 +1342,19 @@ Reverse iterate list keys incrementally.
|
||||||
|
|
||||||
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XLSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Iterate list keys incrementally.
|
||||||
|
|
||||||
|
See [XSCAN](#xscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XLREVSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Reverse iterate list keys incrementally.
|
||||||
|
|
||||||
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
|
||||||
### LDUMP key
|
### LDUMP key
|
||||||
|
|
||||||
See [DUMP](#dump-key) for more information.
|
See [DUMP](#dump-key) for more information.
|
||||||
|
@ -1758,6 +1794,20 @@ Reverse iterate Set keys incrementally.
|
||||||
|
|
||||||
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XSSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Iterate Set keys incrementally.
|
||||||
|
|
||||||
|
See [XSCAN](#xscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
|
||||||
|
### XSREVSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Reverse iterate Set keys incrementally.
|
||||||
|
|
||||||
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
|
||||||
### SDUMP key
|
### SDUMP key
|
||||||
|
|
||||||
See [DUMP](#dump-key) for more information.
|
See [DUMP](#dump-key) for more information.
|
||||||
|
@ -2393,6 +2443,18 @@ Reverse iterate ZSet keys incrementally.
|
||||||
|
|
||||||
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XZSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Iterate ZSet keys incrementally.
|
||||||
|
|
||||||
|
See [XSCAN](#xscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XZREVSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Reverse iterate ZSet keys incrementally.
|
||||||
|
|
||||||
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
### ZRANGEBYLEX key min max [LIMIT offset count]
|
### ZRANGEBYLEX key min max [LIMIT offset count]
|
||||||
|
|
||||||
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.
|
When all the elements in a sorted set are inserted with the same score, in order to force lexicographical ordering, this command returns all the elements in the sorted set at key with a value between min and max.
|
||||||
|
@ -2633,6 +2695,18 @@ Reverse iterate Bitmap keys incrementally.
|
||||||
|
|
||||||
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XBSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Iterate Bitmap keys incrementally.
|
||||||
|
|
||||||
|
See [XSCAN](#xscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
### XBREVSCAN key [MATCH match] [COUNT count]
|
||||||
|
|
||||||
|
Reverse iterate Bitmap keys incrementally.
|
||||||
|
|
||||||
|
See [XREVSCAN](#xrevscan-key-match-match-count-count) for more information.
|
||||||
|
|
||||||
|
|
||||||
## Replication
|
## Replication
|
||||||
|
|
||||||
|
|
|
@ -296,4 +296,6 @@ func init() {
|
||||||
register("bpersist", bpersistCommand)
|
register("bpersist", bpersistCommand)
|
||||||
register("bxscan", bxscanCommand)
|
register("bxscan", bxscanCommand)
|
||||||
register("bxrevscan", bxrevscanCommand)
|
register("bxrevscan", bxrevscanCommand)
|
||||||
|
register("xbscan", bxscanCommand)
|
||||||
|
register("xbrevscan", bxrevscanCommand)
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,4 +323,6 @@ func init() {
|
||||||
register("hpersist", hpersistCommand)
|
register("hpersist", hpersistCommand)
|
||||||
register("hxscan", hxscanCommand)
|
register("hxscan", hxscanCommand)
|
||||||
register("hxrevscan", hxrevscanCommand)
|
register("hxrevscan", hxrevscanCommand)
|
||||||
|
register("xhscan", hxscanCommand)
|
||||||
|
register("xhrevscan", hxrevscanCommand)
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,4 +307,6 @@ func init() {
|
||||||
register("lpersist", lpersistCommand)
|
register("lpersist", lpersistCommand)
|
||||||
register("lxscan", lxscanCommand)
|
register("lxscan", lxscanCommand)
|
||||||
register("lxrevscan", lxrevscanCommand)
|
register("lxrevscan", lxrevscanCommand)
|
||||||
|
register("xlscan", lxscanCommand)
|
||||||
|
register("xlrevscan", lxrevscanCommand)
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,4 +290,6 @@ func init() {
|
||||||
register("spersist", spersistCommand)
|
register("spersist", spersistCommand)
|
||||||
register("sxscan", sxscanCommand)
|
register("sxscan", sxscanCommand)
|
||||||
register("sxrevscan", sxrevscanCommand)
|
register("sxrevscan", sxrevscanCommand)
|
||||||
|
register("xsscan", sxscanCommand)
|
||||||
|
register("xsrevscan", sxrevscanCommand)
|
||||||
}
|
}
|
||||||
|
|
|
@ -804,4 +804,6 @@ func init() {
|
||||||
register("zpersist", zpersistCommand)
|
register("zpersist", zpersistCommand)
|
||||||
register("zxscan", zxscanCommand)
|
register("zxscan", zxscanCommand)
|
||||||
register("zxrevscan", zxrevscanCommand)
|
register("zxrevscan", zxrevscanCommand)
|
||||||
|
register("xzscan", zxscanCommand)
|
||||||
|
register("xzrevscan", zxrevscanCommand)
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,8 +118,8 @@ func testHashScan(t *testing.T, c *ledis.Client) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkScan(t, c, "hxscan")
|
checkScan(t, c, "xhscan")
|
||||||
checkRevScan(t, c, "hxrevscan")
|
checkRevScan(t, c, "xhrevscan")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testListScan(t *testing.T, c *ledis.Client) {
|
func testListScan(t *testing.T, c *ledis.Client) {
|
||||||
|
@ -129,8 +129,8 @@ func testListScan(t *testing.T, c *ledis.Client) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkScan(t, c, "lxscan")
|
checkScan(t, c, "xlscan")
|
||||||
checkRevScan(t, c, "lxrevscan")
|
checkRevScan(t, c, "xlrevscan")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testZSetScan(t *testing.T, c *ledis.Client) {
|
func testZSetScan(t *testing.T, c *ledis.Client) {
|
||||||
|
@ -151,8 +151,8 @@ func testSetScan(t *testing.T, c *ledis.Client) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkScan(t, c, "sxscan")
|
checkScan(t, c, "xsscan")
|
||||||
checkRevScan(t, c, "sxrevscan")
|
checkRevScan(t, c, "xsrevscan")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testBitScan(t *testing.T, c *ledis.Client) {
|
func testBitScan(t *testing.T, c *ledis.Client) {
|
||||||
|
@ -162,6 +162,6 @@ func testBitScan(t *testing.T, c *ledis.Client) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkScan(t, c, "bxscan")
|
checkScan(t, c, "xbscan")
|
||||||
checkRevScan(t, c, "bxrevscan")
|
checkRevScan(t, c, "xbrevscan")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue