forked from mirror/ledisdb
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
|
||||
|
||||
var helpCommands = [][]string{
|
||||
|
@ -111,8 +111,18 @@ var helpCommands = [][]string{
|
|||
{"SYNC", "logid", "Replication"},
|
||||
{"TIME", "-", "Server"},
|
||||
{"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"},
|
||||
{"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"},
|
||||
{"ZCARD", "key", "ZSet"},
|
||||
{"ZCLEAR", "key", "ZSet"},
|
||||
|
|
|
@ -50,11 +50,11 @@ Transaction API:
|
|||
LedisDB supplies `xscan`, `xrevscan`, etc, to fetch data iteratively and reverse iteratively.
|
||||
|
||||
+ KV: `xscan`, `xrevscan`
|
||||
+ Hash: `hxscan`, `hxrevscan`
|
||||
+ List: `lxscan`, `lxrevscan`
|
||||
+ Set: `sxscan` , `sxrevscan`
|
||||
+ Zset: `zxscan`, `zxrevscan`
|
||||
+ Bitmap: `bxscan`, `bxrevscan`
|
||||
+ Hash: `hxscan`, `hxrevscan`, `xhscan`, `xhrevscan`
|
||||
+ List: `lxscan`, `lxrevscan`, `xlscan`, `xlrevscan`
|
||||
+ Set: `sxscan` , `sxrevscan`, `xsscan`, `xsrevscan`
|
||||
+ Zset: `zxscan`, `zxrevscan`, `xzscan`, `xzrevscan`
|
||||
+ Bitmap: `bxscan`, `bxrevscan`, `xbscan`, `xbrevscan`
|
||||
|
||||
## DUMP
|
||||
|
||||
|
|
|
@ -724,6 +724,66 @@
|
|||
"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": {
|
||||
"arguments" : "key ttl value",
|
||||
"group" : "Server",
|
||||
|
|
|
@ -50,6 +50,8 @@ Table of Contents
|
|||
- [HPERSIST key](#hpersist-key)
|
||||
- [HXSCAN key [MATCH match] [COUNT count]](#hxscan-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)
|
||||
- [List](#list)
|
||||
- [BLPOP key [key ...] timeout](#blpop-key-key--timeout)
|
||||
|
@ -69,6 +71,8 @@ Table of Contents
|
|||
- [LPERSIST key](#lpersist-key)
|
||||
- [LXSCAN key [MATCH match] [COUNT count]](#lxscan-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)
|
||||
- [Set](#set)
|
||||
- [SADD key member [member ...]](#sadd-key-member-member-)
|
||||
|
@ -90,6 +94,8 @@ Table of Contents
|
|||
- [SPERSIST key](#spersist-key)
|
||||
- [SXSCAN key [MATCH match] [COUNT count]](#sxscan-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)
|
||||
- [ZSet](#zset)
|
||||
- [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)
|
||||
- [ZXSCAN key [MATCH match] [COUNT count]](#zxscan-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)
|
||||
- [ZREMRANGEBYLEX key min max](#zremrangebylex-key-min-max)
|
||||
- [ZLEXCOUNT key min max](#zlexcount-key-min-max)
|
||||
|
@ -135,6 +143,8 @@ Table of Contents
|
|||
- [BPERSIST key](#bpersist-key)
|
||||
- [BXSCAN key [MATCH match] [COUNT count]](#bxscan-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)
|
||||
- [SLAVEOF host port [RESTART] [READONLY]](#slaveof-host-port-restart-readonly)
|
||||
- [FULLSYNC [NEW]](#fullsync-new)
|
||||
|
@ -981,6 +991,19 @@ Reverse iterate Hash keys incrementally.
|
|||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
### 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
|
||||
|
||||
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.
|
||||
|
||||
### 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
|
||||
|
||||
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.
|
||||
|
||||
### 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]
|
||||
|
||||
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.
|
||||
|
||||
### 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
|
||||
|
||||
|
|
|
@ -296,4 +296,6 @@ func init() {
|
|||
register("bpersist", bpersistCommand)
|
||||
register("bxscan", bxscanCommand)
|
||||
register("bxrevscan", bxrevscanCommand)
|
||||
register("xbscan", bxscanCommand)
|
||||
register("xbrevscan", bxrevscanCommand)
|
||||
}
|
||||
|
|
|
@ -323,4 +323,6 @@ func init() {
|
|||
register("hpersist", hpersistCommand)
|
||||
register("hxscan", hxscanCommand)
|
||||
register("hxrevscan", hxrevscanCommand)
|
||||
register("xhscan", hxscanCommand)
|
||||
register("xhrevscan", hxrevscanCommand)
|
||||
}
|
||||
|
|
|
@ -307,4 +307,6 @@ func init() {
|
|||
register("lpersist", lpersistCommand)
|
||||
register("lxscan", lxscanCommand)
|
||||
register("lxrevscan", lxrevscanCommand)
|
||||
register("xlscan", lxscanCommand)
|
||||
register("xlrevscan", lxrevscanCommand)
|
||||
}
|
||||
|
|
|
@ -290,4 +290,6 @@ func init() {
|
|||
register("spersist", spersistCommand)
|
||||
register("sxscan", sxscanCommand)
|
||||
register("sxrevscan", sxrevscanCommand)
|
||||
register("xsscan", sxscanCommand)
|
||||
register("xsrevscan", sxrevscanCommand)
|
||||
}
|
||||
|
|
|
@ -804,4 +804,6 @@ func init() {
|
|||
register("zpersist", zpersistCommand)
|
||||
register("zxscan", zxscanCommand)
|
||||
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")
|
||||
checkRevScan(t, c, "hxrevscan")
|
||||
checkScan(t, c, "xhscan")
|
||||
checkRevScan(t, c, "xhrevscan")
|
||||
}
|
||||
|
||||
func testListScan(t *testing.T, c *ledis.Client) {
|
||||
|
@ -129,8 +129,8 @@ func testListScan(t *testing.T, c *ledis.Client) {
|
|||
}
|
||||
}
|
||||
|
||||
checkScan(t, c, "lxscan")
|
||||
checkRevScan(t, c, "lxrevscan")
|
||||
checkScan(t, c, "xlscan")
|
||||
checkRevScan(t, c, "xlrevscan")
|
||||
}
|
||||
|
||||
func testZSetScan(t *testing.T, c *ledis.Client) {
|
||||
|
@ -151,8 +151,8 @@ func testSetScan(t *testing.T, c *ledis.Client) {
|
|||
}
|
||||
}
|
||||
|
||||
checkScan(t, c, "sxscan")
|
||||
checkRevScan(t, c, "sxrevscan")
|
||||
checkScan(t, c, "xsscan")
|
||||
checkRevScan(t, c, "xsrevscan")
|
||||
}
|
||||
|
||||
func testBitScan(t *testing.T, c *ledis.Client) {
|
||||
|
@ -162,6 +162,6 @@ func testBitScan(t *testing.T, c *ledis.Client) {
|
|||
}
|
||||
}
|
||||
|
||||
checkScan(t, c, "bxscan")
|
||||
checkRevScan(t, c, "bxrevscan")
|
||||
checkScan(t, c, "xbscan")
|
||||
checkRevScan(t, c, "xbrevscan")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue