Redis hash hashing data type related commands

Source: Internet
Author: User
Tags hash redis

Hset key field value

Function: Set the value of the filed field in the key to value

Note: If there is no field field, add directly, if any, overwrite the value of the original Field field

Hmset key field1 value1 [field2 value2 field3 value3 ... fieldn Valuen]

Function: Set field1->n domain, corresponding value is Value1->n

(the corresponding PHP is understood as $key = Array (file1=>value1, field2=>value2 .... Fieldn=>valuen))

Hget key Field

Function: Returns the value of the Field field in key

Hmget key Field1 Field2 fieldn

Function: Returns the value of the Field1 field2 fieldn field in key

Hgetall Key

Function: Returns the key, all fields and their values

Hdel key Field

Role: Delete the Field field in key

Hlen Key

Function: Returns the number of elements in key

Hexists key Field

Function: Determine if there is a field field in key

Hinrby key field value

Function: The value of the field field in key is increased by the integer value

Hinrby Float key field value

Function: The Value of Field field in key is increased by floating point value

Hkeys Key

Function: Returns all the field in key

Kvals Key

Function: Returns all the value in key

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.