Redis Chinese API

Source: Internet
Author: User
Tags echo message
Redis Chinese APICategory: Database 2012-06-12 17:38 1412 people read comments (1) Favorites Report Redis API list DataSet server database

Redis all the orders.

<<about list>>

Lpop key: Deletes and obtains an element of the list header
Rpop key: Deletes and obtains an element of the list tail
Blpop key [key ...] timeout: Deletes and obtains a list header element, if not on block
Brpop key [key ...] timeout: Deletes and obtains an element in the tail of the list, if not on block
Lpush key value: extends an element in the list header
Rpush key value: extends an element at the end of the list
Lpushx Key value: If the list exists, expand an element in the list header
Rpushx Key value: If the list exists, expand an element at the end of the list
Lindex Key index: Gets an element of the list by index
Llen key: Gets the length of the list
Lrange key start stop: Gets the elements of the list within the specified range
Lrem Key count value: Deletes the elements of the list
LSet Key Index Value: Sets the value of the element that lists index to index
LTrim key start stop: Cropping list, preserving a range of elements
Rpoplpush Source Destination: Deletes an element at the end of the current list and extends it to the tail of another list
Brpoplpush Source Destination Timeout:
pops up the list element and inserts it into another list, then returns if the previous list is empty
Sort key [by mode] [limit offset count] [get mode [get pattern ...]] [Asc|desc] [Alpha] [Store Destination]:
Sort List,set, Sorted set
<<about set>>
Sadd Key member: add one to set
Srem Key member: Removes a members from set
Sdiff key [Key ...]: set to find the difference set
Sinter key [Key ...]: Set intersection
Sunion key [Key ...]: Set and set
Sdiffstore destination key [key ...]: set to find the difference set and save the result set to another collection
Sinterstore destination key [key ...]: Set intersection and save result set to another collection
Sunionstore destination key [key ...]: set to set and save the result set to another set
SCard key: Total Set members obtained
Sismember Key member: Determines whether a given value is set
Spop key: Deletes and returns any member of set
Srandmember key: Returns any member of a set
Smembers key: Get all members of set
Smove Source Destination member: Moves one of the members of a set to another set
<<about Sorted set>>
Zadd Key SCORE member: Adds a membership to the Sset, or updates an existing member's score
Zcard key: Total number of members obtained sset
Zcount Key min Max: Calculates the total number of score members in a given range in Sset
Zincrby key: Self-adding for members in Sset score
Zinterstore destination Numkeys key [key ...] [Weights weight [weight ...]] [Aggregate Sum|min|max]:
Find the Sset intersection and save the result set to a new key
Zrange key start Stop [Withscores]: Returns a member within a certain index range in Sset
Zrangebyscore key min Max [withscores] [limit offset count]: Returns a member within a certain score range in Sset
Zrem Key member: Delete one of the members of the Sset
Zremrangebyrank Key start stop: Delete Sset members within a certain index range
Zremrangebyscore Key min Max: Delete Sset a member of a certain score range
Zrevrange key start Stop [Withscores]: Returns the members in a certain index range in Sset, in the order of score from high to low
Zrevrangebyscore key Max min [withscores] [limit offset count]: Returns a member in a score range of Sset, in the order of score from high to low
Zscore Key member: Gets the score associated with a given member in Sset
Zunionstore destination Numkeys key [key ...] [Weights weight [weight ...]] [Aggregate Sum|min|max]:
Sset the set and saves the result set to a new key
<<about hash>>
Hdel key field: Delete a Hashfield
Hexists key field: Determine if a hashfield exists
Hget key field: Get a Hashfield value
Hgetall key: Get a hash of all the fields and values
Hincrby key field increment: An integer value that adds increment to the integer value of Hashfield
Hkeys key: Get the hash all field
Hlen key: Get total field in hash
Hmget key field [Field ...]: Get all the values of the hash specified field
Hmset key field value [Field value ...]: Set some filed and value of the hash
Hset key field value: Set a field for a hash to a value
Hsetnx key field value: When a field in a hash does not exist, set it to a value
Hvals key: Get all values of hash
<<about key>>
Del key [key ...]: Delete a key
Get key: Gets the value of a key
Setex Key seconds Value: Sets the value and exp time of the key
Setnx Key value: Sets the value of the key, provided that the key does not exist before
Set key value: Setting Key,value
Append key value: Extends a value to a key
Debug Object key: Get debug information for a key
DECR key: Give a key-1
Decrby key integer: to a Key-integer
Exists key: Determine if a key exists
Expire key seconds: Set the TTL for a key (second)
Expireat key timestamp: Sets the TTL for a key (Unix timestamp)
TTL key: Gets the TTL of the key
Persist key: Deletes an expiration flag for a key
Keys pattern: Find all key that matches the pattern
Move key DB: Moves a key to another database
Rename key newkey: Renaming a key
Renamenx key Newkey: Renames a key, provided the new keyname does not exist
Randomkey: Returns a any key from the Keyspace
<<about value>>
GetRange key start end: Gets the substring of the specified range in the string corresponding to the key
Getset Key value: Sets the value of the key and returns the old value
INCR key: The integer value corresponding to the key is increased by 1
Incrby key increment: An integer value that corresponds to a key is self added increment
Mget key [key ...]: Gets the value of all specified key
Mset key value [key value ...]: Sets the specified values for the specified keys
Msetnx key value [key value ...]: Sets the specified values for the specified keys when the specified key exists
Strlen key: Gets the value length of the key
<<about server>>
Info: Get Server status information and statistics
Monitor: Real-time monitoring of all requests received by server
Ping:ping Server
Quit: Close link
Publish Channel message: Post a news to a channel
Auth Password: Authentication server
Lastsave: Time stamp to get the last successful Savetodisk
Object subcommand [arguments [arguments ...]]: Detecting the interior of a Redis object
Psubscribe pattern [pattern ...]: Listen for all pattern messages posted to Channel
Punsubscribe [pattern [...]]: Stop listening for all pattern messages posted to Channel
Config resetstat: Reset the status information returned by the info command
Subscribe Channel [Channel ...]: Listening for messages that specify channel
unsubscribe [Channel [Channel ...]]: Stop listening for messages for the specified channel
Unwatch:forget about all watched keys stop monitoring all monitored key
Watch key [key ...]: monitors all given keys to determine the execution of multi and exec blocks
<<about database>>
Save synchronously: Saving a DataSet to a hard disk
Select index: Toggle Current Database
Bgsave: Save DataSet to Hard disk asynchronously
Dbsize: Returns the key total for a database
Flushall: Delete all key on the database
FLUSHDB: Delete all key on the current database
Shutdown synchronously: After saving the dataset to the hard disk, shut down the server
<<configure>>
Config get parameter: Getting a configuration parameter value
Config Set parameter value: Sets a configuration parameter to the given value
<<other>>
Getbit Key offset: Returns the bit value of the key corresponding to the value at offset
Multi: Identifies the start of a business block
SetRange Key offset value: overwrites the value string corresponding to the write key from the specified offset
Bgrewriteaof: Asynchronous rewrite append-only file
Debug Segfault: Make server crash
Discard: Ignore all commands that start with multi
echo Message:echo Message
EXEC: Execute all commands that start with multi
Slaveof host Port: Make this server A slave of another Redis host, or make this server the primary server
Sync: Internal backup command
Linsert key Before|after Refvalue value: Inserts value before or after refvalue to the list key
Zrank key Member:determine The index of a member in a sorted set
Zrevrank key Member:determine The index of a sorted set, with scores ordered
Setbit key offset value:sets or clears the bit at offset on the string value stored at key
Type Key:determine the type stored at 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.