mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-04 16:32:41 +08:00
support Command command
This commit is contained in:
@@ -426,3 +426,21 @@ func init() {
|
||||
RegisterCommand("RenameNx", execRenameNx, prepareRename, undoRename, 3, flagReadOnly)
|
||||
RegisterCommand("Keys", execKeys, noPrepare, nil, 2, flagReadOnly)
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterGodisCommand("Del", -2, []string{Write}, 1, -1, 1, writeAllKeys)
|
||||
RegisterGodisCommand("Expire", 3, []string{Write, Fast}, 1, 1, 1, writeFirstKey)
|
||||
RegisterGodisCommand("ExpireAt", 3, []string{Write, Fast}, 1, 1, 1, writeFirstKey)
|
||||
RegisterGodisCommand("ExpireTime", 2, []string{Write, Fast}, 1, 1, 1, readFirstKey)
|
||||
RegisterGodisCommand("PExpire", 3, []string{Write, Fast}, 1, 1, 1, writeFirstKey)
|
||||
RegisterGodisCommand("PExpireAt", 3, []string{Write, Fast}, 1, 1, 1, writeFirstKey)
|
||||
RegisterGodisCommand("PExpireTime", 2, []string{Write, Fast}, 1, 1, 1, readFirstKey)
|
||||
RegisterGodisCommand("TTL", 2, []string{Readonly, Random, Fast}, 1, 1, 1, readFirstKey)
|
||||
RegisterGodisCommand("PTTL", 2, []string{Readonly, Random, Fast}, 1, 1, 1, readFirstKey)
|
||||
RegisterGodisCommand("Persist", 2, []string{Write, Fast}, 1, 1, 1, writeFirstKey)
|
||||
RegisterGodisCommand("Exists", -2, []string{Readonly, Fast}, 1, 1, 1, readAllKeys)
|
||||
RegisterGodisCommand("Type", 2, []string{Readonly, Fast}, 1, 1, 1, readFirstKey)
|
||||
RegisterGodisCommand("Rename", 3, []string{Write}, 1, 1, 1, prepareRename)
|
||||
RegisterGodisCommand("RenameNx", 3, []string{Write, Fast}, 1, 1, 1, prepareRename)
|
||||
RegisterGodisCommand("Keys", 2, []string{Readonly, SortForScript}, 1, 1, 1, nil)
|
||||
}
|
||||
|
Reference in New Issue
Block a user