KeysOnlyReader
从数据库中获取键名称。
Redis 堆栈 |
---|
这KeysOnlyReader
only 从数据库中提取键名称。
构造 函数
您可以使用这些构造函数之一来创建新的KeysOnlyReader
对象:
public KeysOnlyReader()
public KeysOnlyReader(int scanSize, String pattern)
Parameters
Name
Type
Default value
Description
pattern
string
"*" (match all keys)
Get all keys that match this pattern
scanSize
integer
10000
The scan command's size limit
Output records
Each output record is a string that represents the key's name.
Examples
Get all keys in the database:
KeysOnlyReader reader = new KeysOnlyReader();
Only get keys that start with "user:":
KeysOnlyReader reader = new KeysOnlyReader(1000, "user:*");
On this page