Redis 

Redis 


Output:

Click on RUN button to see the output

Redis online editor

Write, Run & Share Redis queries online using OneCompiler's Redis online editor and compiler for free. It's one of the robust, feature-rich online editor and compiler for Redis. Getting started with the OneCompiler's Redis editor is really simple and pretty fast. The editor shows sample boilerplate code when you choose database as 'Redis' and start writing queries to learn and test online without worrying about tedious process of installation.

About Redis

Redis is a open source, no SQL database which works on the concept of key-value pair.

Key Features:

  • In-memory data structure store
  • Works on Redis Client and Redis Server architecture where client and server can be on same computer or on different computers
  • Extremely fast
  • Supports append-only file persistence mode
  • Follows a very simple and fast Master/Slave replication
  • supports a number of languages

Syntax help

Commands

CommandSyntax
SetSET KEY_NAME VALUE
GetGET KEY_NAME
GetsetGETSET KEY_NAME VALUE
SetRangeSETRANGE KEY_NAME OFFSET VALUE
StrlenSTRLEN KEY_NAME
AppendAPPEND KEY_NAME NEW_VALUE
ExistsEXISTS KEY_NAME
Deletedel KEY_NAME
Increment counterincr KEY_NAME
Decrement counterdecr KEY_NAME
Push Value to Listlpush listName value
Push Value to Start/Beginningrpush listName value
Push Value to List only if it existslpushx listName value
Remove & return value from listlpop listName
Remove & return value from Start/Beginningrpop listName
Set xth position element to valuelset listName x-1 value
Check if hash key existshexists hashName field
Get a hash keyhget hashName field
Delete a hash keyhdel hashName field
Get all hash contenthgetall hashName
List all hash keyshkeys hashName
List number of hash keyshlen hashName
Get multiple hash keyshmget key1 key2 ...
Set multiple hash keyshmset key1 value1 key2 value2...
Increment a hash keyhincrby hashName field incrValue