memberfieldRedis操作 hash sort String sorted_set list help @String @list

本文纯属个人见解,是对前面学习的总结,如有描述不正确的地方还请高手指正~

    redis 127.0.0.1:6379> help @string

  APPEND key value

  summary: Append a value to a key

  since: 1.3.3

  DECR key

  summary: Decrement the integer value of a key by one

  since: 0.07

  DECRBY key decrement

  summary: Decrement the integer value of a key by the given number

  since: 0.07

  GET key

  summary: Get the value of a key

  since: 0.07

  GETBIT key offset

  summary: Returns the bit value at offset in the string value stored at key

  since: 2.1.8

    redis 127.0.0.1:6379> help @hash


  HDEL key field
  summary: Delete a hash field
  since: 1.3.10


  HEXISTS key field
  summary: Determine if a hash field exists
  since: 1.3.10


  HGET key field
  summary: Get the value of a hash field
  since: 1.3.10


  HGETALL key
  summary: Get all the fields and values in a hash
  since: 1.3.10


  HINCRBY key field increment
  summary: Increment the integer value of a hash field by the given number
  since: 1.3.10


  HKEYS key
  summary: Get all the fields in a hash
  since: 1.3.10


  HLEN key
  summary: Get the number of fields in a hash
  since: 1.3.10


  HMGET key field [field ...]
  summary: Get the values of all the given hash fields
  since: 1.3.10


  HMSET key field value [field value ...]
  summary: Set multiple hash fields to multiple values
  since: 1.3.8


  HSET key field value
  summary: Set the string value of a hash field
  since: 1.3.10


  HSETNX key field value
  summary: Set the value of a hash field, only if the field does not exist
  since: 1.3.8


  HVALS key
  summary: Get all the values in a hash
  since: 1.3.10


redis 127.0.0.1:6379> help @set



  SADD key member
  summary: Add a member to a set
  since: 0.07


  SCARD key
  summary: Get the number of members in a set
  since: 0.07


  SDIFF key [key ...]
  summary: Subtract multiple sets
  since: 0.100


  SDIFFSTORE destination key [key ...]
  summary: Subtract multiple sets and store the resulting set in a key
  since: 0.100


  SINTER key [key ...]
  summary: Intersect multiple sets
  since: 0.07


  SINTERSTORE destination key [key ...]
  summary: Intersect multiple sets and store the resulting set in a key
  since: 0.07


  SISMEMBER key member
  summary: Determine if a given value is a member of a set
  since: 0.07


  SMEMBERS key
  summary: Get all the members in a set
  since: 0.07


  SMOVE source destination member
  summary: Move a member from one set to another
  since: 0.091


  SPOP key
  summary: Remove and return a random member from a set
  since: 0.101


  SRANDMEMBER key
  summary: Get a random member from a set
  since: 1.001


  SREM key member
  summary: Remove a member from a set
  since: 0.07


  SUNION key [key ...]
  summary: Add multiple sets
  since: 0.091


  SUNIONSTORE destination key [key ...]
  summary: Add multiple sets and store the resulting set in a key
  since: 0.091


redis 127.0.0.1:6379> 

  GETSET key value

  summary: Set the string value of a key and return its old value

  since: 0.091

  INCR key

  summary: Increment the integer value of a key by one

  since: 0.07

  INCRBY key increment

  summary: Increment the integer value of a key by the given number

  since: 0.07

  MGET key [key ...]

  summary: Get the values of all the given keys

  since: 0.07

  MSET key value [key value ...]

  summary: Set multiple keys to multiple values

  since: 1.001

  MSETNX key value [key value ...]

  summary: Set multiple keys to multiple values, only if none of the keys exist

    每日一道理
成功的花朵开放在啊勤劳的枝头,失败的苦果孕育在懒惰的温床之中。

  since: 1.001

  SET key value

  summary: Set the string value of a key

  since: 0.07

  SETBIT key offset value

  summary: Sets or clears the bit at offset in the string value stored at key

  since: 2.1.8

  SETEX key seconds value

  summary: Set the value and expiration of a key

  since: 1.3.10

  SETNX key value

  summary: Set the value of a key, only if the key does not exist

  since: 0.07

  SETRANGE key offset value

  summary: Overwrite part of a string at key starting at the specified offset

  since: 2.1.8

  STRLEN key

  summary: Get the length of the value stored in a key

  since: 2.1.2

  SUBSTR key start end

  summary: Get a substring of the string stored at a key

  since: 1.3.4

    redis 127.0.0.1:6379> help @list

  BLPOP key [key ...] timeout

  summary: Remove and get the first element in a list, or block until one is available

  since: 1.3.1

  BRPOP key [key ...] timeout

  summary: Remove and get the last element in a list, or block until one is available

  since: 1.3.1

  BRPOPLPUSH source destination timeout

  summary: Pop a value from a list, push it to another list and return it; or block until one is available

  since: 2.1.7

  LINDEX key index

  summary: Get an element from a list by its index

  since: 0.07

  LINSERT key BEFORE|AFTER pivot value

  summary: Insert an element before or after another element in a list

  since: 2.1.1

  LLEN key

  summary: Get the length of a list

  since: 0.07

  LPOP key

  summary: Remove and get the first element in a list

  since: 0.07

  LPUSH key value

  summary: Prepend a value to a list

  since: 0.07

  LPUSHX key value

  summary: Prepend a value to a list, only if the list exists

  since: 2.1.1

  LRANGE key start stop

  summary: Get a range of elements from a list

  since: 0.07

  LREM key count value

  summary: Remove elements from a list

  since: 0.07

  LSET key index value

  summary: Set the value of an element in a list by its index

  since: 0.07

  LTRIM key start stop

  summary: Trim a list to the specified range

  since: 0.07

  RPOP key

  summary: Remove and get the last element in a list

  since: 0.07

  RPOPLPUSH source destination

  summary: Remove the last element in a list, append it to another list and return it

  since: 1.1

  RPUSH key value

  summary: Append a value to a list

  since: 0.07

  RPUSHX key value

  summary: Append a value to a list, only if the list exists

  since: 2.1.1

    

    
redis 127.0.0.1:6379> help @sorted_set

    

  ZADD key score member

  summary: Add a member to a sorted set, or update its score if it already exists

  since: 1.1

  ZCARD key

  summary: Get the number of members in a sorted set

  since: 1.1

  ZCOUNT key min max

  summary: Count the members in a sorted set with scores within the given values

  since: 1.3.3

  ZINCRBY key increment member

  summary: Increment the score of a member in a sorted set

  since: 1.1

  ZINTERSTORE destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]

  summary: Intersect multiple sorted sets and store the resulting sorted set in a new key

  since: 1.3.10

  ZRANGE key start stop [WITHSCORES]

  summary: Return a range of members in a sorted set, by index

  since: 1.1

  ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]

  summary: Return a range of members in a sorted set, by score

  since: 1.050

  ZRANK key member

  summary: Determine the index of a member in a sorted set

  since: 1.3.4

  ZREM key member

  summary: Remove a member from a sorted set

  since: 1.1

  ZREMRANGEBYRANK key start stop

  summary: Remove all members in a sorted set within the given indexes

  since: 1.3.4

  ZREMRANGEBYSCORE key min max

  summary: Remove all members in a sorted set within the given scores

  since: 1.1

  ZREVRANGE key start stop [WITHSCORES]

  summary: Return a range of members in a sorted set, by index, with scores ordered from high to low

  since: 1.1

  ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]

  summary: Return a range of members in a sorted set, by score, with scores ordered from high to low

  since: 2.1.6

  ZREVRANK key member

  summary: Determine the index of a member in a sorted set, with scores ordered from high to low

  since: 1.3.4

  ZSCORE key member

  summary: Get the score associated with the given member in a sorted set

  since: 1.1

  ZUNIONSTORE destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]

  summary: Add multiple sorted sets and store the resulting sorted set in a new key

  since: 1.3.10

文章结束给大家分享下程序员的一些笑话语录: 关于编程语言
如果 C++是一把锤子的话,那么编程就会变成大手指头。
如果你找了一百万只猴子来敲打一百万个键盘,那么会有一只猴子会敲出一 段 Java 程序,而其余的只会敲出 Perl 程序。
一阵急促的敲门声,“谁啊!”,过了 5 分钟,门外传来“Java”。
如果说 Java 很不错是因为它可以运行在所有的操作系统上,那么就可以说 肛交很不错,因为其可以使用于所有的性别上。

--------------------------------- 原创文章 By
member和field
---------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值