重温战场 发表于 2018-11-5 06:09:50

redis演练(2) 最全redis命令列表

  官方The full list of commands
  官方在线交互学习工具
  Redis命令参考简体中文版
  Redis-cli命令最新总结
  Redis 命令参考(官方中文翻译)
  Redis命令简明示例
  下面列表是本人通过程序搜集的help命令整理的聚合列表,希望为redis填把火。
COMMANDsummarysincegroupDEL key Delete a key 1.0.0 genericEXISTSkey Determine if a key exists 1.0.0 genericEXPIREkey seconds Set a key's time to liveinseconds 1.0.0 genericKEYSpattern Find all keys matching thegivenpattern 1.0.0 genericPEXPIREkey milliseconds Set a key's time to liveinmilliseconds 2.6.0 genericRENAMEkey newkey Rename a key 1.0.0 genericRENAMENXkey newkey Rename a key, only if thenew keydoes not exist 1.0.0 genericSORT key ] Sort the elements in alist, setor sorted set 1.0.0 genericTTL key Get the time to live for akey 1.0.0 genericTYPE key Determine the type storedat key 1.0.0 genericHDELkey field Delete one or more hashfields 2.0.0 hashHEXISTSkey field Determine if a hash fieldexists 2.0.0 hashHGETkey field Get the value of a hashfield 2.0.0 hashHGETALLkey Get all the fields andvalues in ahash 2.0.0 hashHINCRBYkey field increment Increment the integervalue of ahash field by the given number 2.0.0 hashHKEYSkey Get all the fields in ahash 2.0.0 hashHLENkey Get the number of fieldsin a hash 2.0.0 hashHMGETkey field Get the values of all thegivenhash fields 2.0.0 hashHMSETkey field value Set multiple hash fieldstomultiple values 2.0.0 hashHSETkey field value Set the string value of ahashfield 2.0.0 hashHVALSkey Get all the values in ahash 2.0.0 hashLINDEXkey index Get an element from a listby itsindex 1.0.0 listLLENkey Get the length of a list 1.0.0 listLPOPkey Remove and get the firstelementin a list 1.0.0 listLPUSHkey value Prepend one or multiplevalues toa list 1.0.0 listLRANGEkey start stop Get a range of elementsfrom alist 1.0.0 listLREM keycount value Remove elements from alist 1.0.0 listLSETkey index value Set the value of anelement in alist by its index 1.0.0 listLTRIMkey start stop Trim a list to thespecified range 1.0.0 listRPOPkey Remove and get the lastelement ina list 1.0.0 listRPOPLPUSHsource destination Remove the last element ina list,prepend it to another list and return it 1.2.0 listRPUSHkey value Append one or multiplevalues to alist 1.0.0 listSADDkey member Add one or more members toa set 1.0.0 setSCARDkey Get the number of membersin a set 1.0.0 setSDIFFkey Subtract multiple sets 1.0.0 setSDIFFSTOREdestination key Subtract multiple sets andstorethe resulting set in a key 1.0.0 setSINTERkey Intersect multiple sets 1.0.0 setSINTERSTOREdestination key Intersect multiple setsand storethe resulting set in a key 1.0.0 setSISMEMBERkey member Determine if a given valueis amember of a set 1.0.0 setSMEMBERSkey Get all the members in aset 1.0.0 setSMOVEsource destination member Move a member from one settoanother 1.0.0 setSPOP key Remove and return one ormultiplerandom members from a set 1.0.0 setSRANDMEMBERkey Get one or multiple randommembersfrom a set 1.0.0 setSREMkey member Remove one or more membersfrom aset 1.0.0 setSUNIONkey Add multiple sets 1.0.0 setSUNIONSTOREdestination key Add multiple sets andstore theresulting set in a key 1.0.0 setZADDkey score member Add one or more members toasorted set, or update its score if it already exists 1.2.0 sorted_setZCARDkey Get the number of membersin asorted set 1.2.0 sorted_setZCOUNTkey min max Count the members in asorted setwith scores within the given values 2.0.0 sorted_setZINCRBYkey increment member Increment the score of amember ina sorted set 1.2.0 sorted_setZRANGEkey start stop Return a range of membersin asorted set, by index 1.2.0 sorted_setZRANGEBYSCOREkey min max Return a range of membersin asorted set, by score 1.0.5 sorted_setZRANKkey member Determine the index of amember ina sorted set 2.0.0 sorted_setZREMkey member Remove one or more membersfrom asorted set 1.2.0 sorted_setZREMRANGEBYSCOREkey min max Remove all members in asorted setwithin the given scores 1.2.0 sorted_setZREVRANGEkey start stop Return a range of membersin asorted set, by index, with scores ordered from high to low 1.2.0 sorted_setZSCOREkey member Get the score associatedwith thegiven member in a sorted set 1.2.0 sorted_setDECRkey Decrement the integervalue of akey by one 1.0.0 stringDECRBYkey decrement Decrement the integervalue of akey by the given number 1.0.0 stringGET key Get the value of a key 1.0.0 stringGETSETkey value Set the string value of akey andreturn its old value 1.0.0 stringINCRkey Increment the integervalue of akey by one 1.0.0 stringINCRBYkey increment Increment the integervalue of akey by the given amount 1.0.0 stringMGETkey Get the values of all thegivenkeys 1.0.0 stringMSETkey value Set multiple keys tomultiplevalues 1.0.1 stringMSETNXkey value Set multiple keys tomultiplevalues, only if none of the keys exist 1.0.1 stringSET keyvalue Set the string value of akey 1.0.0 stringSETEXkey seconds value Set the value andexpiration of akey 2.0.0 stringSETNXkey value Set the value of a key,only ifthe key does not exist 1.0.0 stringMULTI Mark the start of atransactionblock 1.2.0 transactions  每个命令不复杂,难点就是命令太多,但还需要自己花时间一行行的敲,一个个的实验。

页: [1]
查看完整版本: redis演练(2) 最全redis命令列表