Nosql->redis Learning Data types

Source: Internet
Author: User

redis->string binary setnx name Lijie   Determine if the key value exists   If there is a return of 0 does not exist bar value set in  setex   Specify the key value validity time  setex name  lijie setrange   Set the substring of the Vlaue value of the specified key (we aspire to replace the understanding of the 126 mailbox with the Gmail mailbox) SetRange name 6 (word Poute) gmial.com   Note Character length  mset set multiple key values at once   successful return OK identifies all values set, failed returns 0 identifies no value set  getset   Set key value, and returns the old value of key    getrange gets the string of the Vlaue value of the key   For example set a  baoweijun GetRange 0 5 returns Baowei mget one time gets the value of more than one key if the corresponding key does not exist then the corresponding Return NIL INCR to the value of key to do a Gaga operation, and return the new value  incrby pass incr similar to the specified value key does not exist when the key is set and the original value is 0 DECR to the values of the key to do the subtraction operation  decrby DECR similar to subtracting the specified value  append   Appends a string to the specified key to return the length of the new string value  strlen takes the length of the value of the specified key in       hashes type Redi->hash is a string-type field and value mapping table, and his addition, delete operations are all 0 (1). Hash is suitable for storing objects, which is equivalent to dividing each field of an object into the brother string type, storing a degree downstream in the hash type with less memory, and can conveniently access the entire object  hsetnx set Hashfield to the specified value, if key does not exist, It is created first if there are multiple filed values that return 0 hmset at the same time set hash  hget get the word short  hmget   bulk return  hincrby to the specified hash fIled Plus given value   

Nosql->redis Learning Data type

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.