Skip to content

Latest commit

 

History

History
113 lines (89 loc) · 1.45 KB

commands.md

File metadata and controls

113 lines (89 loc) · 1.45 KB

Supported Commands

String

  • get
  • set
  • setex
  • mget
  • mset
  • incr
  • incrby
  • decr
  • decrby
  • strlen
  • setnx
  • getset

Hash

  • hget
  • hstrlen
  • hexists
  • hlen
  • hmget
  • hset
  • hmset
  • hkeys
  • hvals
  • hgetall
  • hdel
  • hincrby

List

  • lpush
  • lpop
  • rpush
  • rpop
  • llen
  • lindex
  • lrange
  • lset

Set

  • sadd
  • scard
  • sismember
  • smembers
  • srem
  • sdiff
  • sunion
  • sinter

ZSet

  • zadd
  • zcard
  • zrange
  • zrevrange
  • zscore
  • zrem
  • zrank
  • zrevrank
  • zincrby

Keys

  • del
  • exists
  • type
  • expire
  • expireat
  • pexpire
  • pexpireat
  • ttl
  • pttl
  • keys

Connection

  • select
  • ping
  • echo
  • auth
  • quit

Server

  • flushdb
  • flushall
  • client list
  • info
  • dbsize

Special Case

keys command

keys command differ from redis keys command:

regular expression as redis don't supported, all as follow:

  • keys * : get all keys in current db
  • keys prefix : get all keys with prefix in current db
  • keys prefix* : just like keys prefix, get all keys with prefix in current db

two optional params is supported, start and limit(default 5000, max 5000),

  • keys * (start) (limit)
  • keys prefix (start) (limit)
  • keys prefix* (start)(limit)