| Class | Redis::Namespace |
| In: |
lib/redis/namespace.rb
|
| Parent: | Object |
| COMMANDS | = | { "auth" => [], "bgrewriteaof" => [], "bgsave" => [], "blpop" => [ :exclude_last ], "brpop" => [ :exclude_last ], "dbsize" => [], "debug" => [ :exclude_first ], "decr" => [ :first ], "decrby" => [ :first ], "del" => [ :all ], "exists" => [ :first ], "expire" => [ :first ], "flushall" => [], "flushdb" => [], "get" => [ :first ], "getset" => [ :first ], "hset" => [ :first ], "hsetnx" => [ :first ], "hget" => [ :first ], "hincrby" => [ :first ], "hmget" => [ :first ], "hmset" => [ :first ], "hdel" => [ :first ], "hexists" => [ :first ], "hlen" => [ :first ], "hkeys" => [ :first ], "hvals" => [ :first ], "hgetall" => [ :first ], "incr" => [ :first ], "incrby" => [ :first ], "info" => [], "keys" => [ :first, :all ], "lastsave" => [], "lindex" => [ :first ], "llen" => [ :first ], "lpop" => [ :first ], "lpush" => [ :first ], "lrange" => [ :first ], "lrem" => [ :first ], "lset" => [ :first ], "ltrim" => [ :first ], "mapped_hmset" => [ :first ], "mapped_mget" => [ :all, :all ], "mget" => [ :all ], "monitor" => [ :monitor ], "move" => [ :first ], "mset" => [ :alternate ], "msetnx" => [ :alternate ], "psubscribe" => [ :all ], "publish" => [ :first ], "punsubscribe" => [ :all ], "quit" => [], "randomkey" => [], "rename" => [ :all ], "renamenx" => [ :all ], "rpop" => [ :first ], "rpoplpush" => [ :all ], "rpush" => [ :first ], "sadd" => [ :first ], "save" => [], "scard" => [ :first ], "sdiff" => [ :all ], "sdiffstore" => [ :all ], "select" => [], "set" => [ :first ], "setex" => [ :first ], "setnx" => [ :first ], "shutdown" => [], "sinter" => [ :all ], "sinterstore" => [ :all ], "sismember" => [ :first ], "slaveof" => [], "smembers" => [ :first ], "smove" => [ :exclude_last ], "sort" => [ :sort ], "spop" => [ :first ], "srandmember" => [ :first ], "srem" => [ :first ], "subscribe" => [ :all ], "sunion" => [ :all ], "sunionstore" => [ :all ], "ttl" => [ :first ], "type" => [ :first ], "unsubscribe" => [ :all ], "zadd" => [ :first ], "zcard" => [ :first ], "zcount" => [ :first ], "zincrby" => [ :first ], "zrange" => [ :first ], "zrangebyscore" => [ :first ], "zrank" => [ :first ], "zrem" => [ :first ], "zremrangebyrank" => [ :first ], "zremrangebyscore" => [ :first ], "zrevrange" => [ :first ], "zrevrank" => [ :first ], "zscore" => [ :first ], "[]" => [ :first ], "[]=" => [ :first ] |
The following table defines how input parameters and result values should
be modified for the namespace.
COMMANDS is a hash. Each key is the name of a command and each value is a two element array. The first element in the value array describes how to modify the arguments passed. It can be one of:
nil
Do nothing.
:first
Add the namespace to the first argument passed, e.g.
GET key => GET namespace:key
:all
Add the namespace to all arguments passed, e.g.
MGET key1 key2 => MGET namespace:key1 namespace:key2
:exclude_first
Add the namespace to all arguments but the first, e.g.
:exclude_last
Add the namespace to all arguments but the last, e.g.
BLPOP key1 key2 timeout =>
BLPOP namespace:key1 namespace:key2 timeout
:alternate
Add the namespace to every other argument, e.g.
MSET key1 value1 key2 value2 =>
MSET namespace:key1 value1 namespace:key2 value2
The second element in the value array describes how to modify the return value of the Redis call. It can be one of:
nil
Do nothing.
:all
Add the namespace to all elements returned, e.g.
key1 key2 => namespace:key1 namespace:key2
|
|
| ALIASES | = | case when defined? Redis::Client::ALIASES then Redis::Client::ALIASES | support previous versions of redis gem |