Redis共通コマンドクエリー
2408 ワード
# Redis Command
### Base Command
| command | desc | remark |
|---|---|---|
| keys * | key | |
| dbsize | | |
| exists key | | |
| del key | | |
| type key | | |
| move key 2 | 2 | |
| ttl key | | |
| expire key 1 | | |
| persist key | | |
| rename key key1 | key | |
| | | |
### Strings Command
| command | desc | remark |
|---|---|---|
| set key value nx | | setnx |
| sex key value xx | key | |
| get key | | |
| incr key | | |
| incrby key 20 | | |
| incrbyfloat key 0.1 | | |
| decr key | | |
| decrby key 10 | | |
| decrbyfloat key 0.1 | | |
| mset key value | | |
| mget key key1 | | |
| strlen key | | |
| append key new | | |
| getrange key start end | | |
| | | |
### Sets Command
| command | desc | remark |
|---|---|---|
| sadd key value1 value2 | | |
| smembers key | | |
| srandmember key 1 | | |
| sismember key value | | |
| scard | | |
| srem key value| | |
| spop key 2 | | |
| | | |
### Sorted Sets Command
| command | desc | remark |
|---|---|---|
| zadd key score member | | |
| zscore key member | | |
| zrange key 0 -1 | | |
| zrange key 0 -1 withscores | | |
| zcard key | | |
| zcount key 10 101 | | |
| zrank key member | | |
| zrangebyscore key 10 101 withscores | | |
| | | |
### Lists Command
| command | desc | remark |
|---|---|---|
| lpush key value | | |
| rpush key value | | |
| lset key index value | | |
| lpop key | | |
| rpop key | | |
| llen key | | |
| lrange key start end | | lrange key 0 -1 |
| lrem key count value | | |
| ltrim key start end | | |
| | | |
### Hashes Command
| command | desc | remark |
|---|---|---|
| hset key field value | | |
| hmset key field value | | |
| hsetnx key field value | | |
| hgetall | | |
| hget key field | | |
| hkeys key | | |
| hvals key | | |
| hexists key field | | |
| hlen key | | |
| hincrby key field 10 | | |
| hdel key field | | |