dice ~$

Cleanup in: 15:00 mins
Commands left: 1000

DiceDB instance is shared across all users.

BITCOUNT

Syntax

BITCOUNT key [start end]

Description

Counts the number of set bits (population counting) in a string. The optional start and end arguments specify a range of bytes to count.

View Documentation

BITOP

Syntax

BITOP operation destkey key [key ...]

Description

The BITOP command performs bitwise operations between strings (AND, OR, XOR, NOT) and stores the result in the destination key.

View Documentation

BITPOS

Syntax

BITPOS key bit [start] [end]

Description

The BITPOS command returns the position of the first bit set to 1 or 0 in a string, optionally looking within a specific range.

View Documentation

SET

Syntax

SET key value [NX | XX] [EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | KEEPTTL]

Description

The SET command in DiceDB is used to set the value of a key. If the key already holds a value, it is overwritten, regardless of its type. This is one of the most fundamental operations in DiceDB as it allows for both creating and updating key-value pairs.

View Documentation

GET

Syntax

GET key

Description

The GET command retrieves the value of a key. If the key does not exist, nil is returned.

View Documentation

DEL

Syntax

DEL key [key ...]

Description

The DEL command removes the specified keys. A key is ignored if it does not exist.

View Documentation

EXISTS

Syntax

EXISTS key [key ...]

Description

The EXISTS command checks if one or more keys exist. It returns the number of keys that exist.

View Documentation

INCR

Syntax

INCR key

Description

The INCR command increments the number stored at the key by one. If the key does not exist, it is set to 0 before performing the operation.

View Documentation

DECR

Syntax

DECR key

Description

The DECR command decrements the number stored at the key by one. If the key does not exist, it is set to 0 before performing the operation.

View Documentation

DECRBY

Syntax

DECRBY key decrement

Description

The DECRBY command decrements the number stored at key by the given decrement.

View Documentation

ECHO

Syntax

ECHO message

Description

The ECHO command returns the given message as a bulk string.

View Documentation

EXPIRE

Syntax

EXPIRE key seconds

Description

The EXPIRE command sets a timeout on key. After the timeout has expired, the key will be automatically deleted.

View Documentation

EXPIREAT

Syntax

EXPIREAT key timestamp

Description

The EXPIREAT command works exactly like EXPIRE but instead of specifying the number of seconds for the key to live, it takes an absolute Unix timestamp.

View Documentation

MGET

Syntax

MGET key [key ...]

Description

The MGET command retrieves the values of multiple keys. If a key does not exist, nil is returned for that key.

View Documentation

MSET

Syntax

MSET key value [key value ...]

Description

The MSET command sets the given keys to their respective values. This is a faster alternative to issuing multiple SET commands.

View Documentation

HSET

Syntax

HSET key field value [field value ...]

Description

The HSET command sets the specified fields to their respective values in a hash stored at key. If the key does not exist, a new key holding a hash is created.

View Documentation

HGET

Syntax

HGET key field

Description

The HGET command retrieves the value of a specific field from a hash stored at the key.

View Documentation

HDEL

Syntax

HDEL key field [field ...]

Description

The HDEL command removes the specified fields from a hash stored at key.

View Documentation

HGETALL

Syntax

HGETALL key

Description

The HGETALL command retrieves all fields and values of a hash stored at key.

View Documentation

HEXISTS

Syntax

HEXISTS key field

Description

The HEXISTS command returns if the field exists in the hash stored at key.

View Documentation

HLEN

Syntax

HLEN key

Description

The HLEN command returns the number of fields contained in the hash stored at key.

View Documentation

INCRBYFLOAT

Syntax

INCRBYFLOAT key increment

Description

The INCRBYFLOAT command increments the float value stored at key by the specified increment.

View Documentation

LPUSH

Syntax

LPUSH key value [value ...]

Description

The LPUSH command inserts the specified values at the head (left) of the list stored at key.

View Documentation

RPUSH

Syntax

RPUSH key value [value ...]

Description

The RPUSH command inserts the specified values at the tail (right) of the list stored at key.

View Documentation

LPOP

Syntax

LPOP key

Description

The LPOP command removes and returns the first element of the list stored at key.

View Documentation

RPOP

Syntax

RPOP key

Description

The RPOP command removes and returns the last element of the list stored at key.

View Documentation

SADD

Syntax

SADD key member [member ...]

Description

The SADD command adds the specified members to the set stored at key. If a member already exists, it is ignored.

View Documentation

SMEMBERS

Syntax

SMEMBERS key

Description

The SMEMBERS command retrieves all the members of the set stored at key.

View Documentation

PING

Syntax

PING

Description

The PING command checks if the server is running and returns a PONG response.

View Documentation

PFADD

Syntax

PFADD key element [element ...]

Description

The PFADD command adds elements to a HyperLogLog data structure stored at the specified key. If the key does not exist, a new HyperLogLog is created.

View Documentation

PFCOUNT

Syntax

PFCOUNT key

Description

The PFCOUNT command returns the approximated cardinality (number of unique elements) of the HyperLogLog data structure stored at the specified key.

View Documentation

PFMERGE

Syntax

PFMERGE destkey sourcekey [sourcekey ...]

Description

The PFMERGE command merges multiple HyperLogLog data structures into a single one, stored at destkey.

View Documentation

TTL

Syntax

TTL key

Description

The TTL command returns the remaining time to live of a key that has an expiration set. If the key does not exist, -2 is returned.

View Documentation

HELLO

Syntax

HELLO [version]

Description

The HELLO command is used to connect to the server and switch to the desired protocol. It can be used to specify a version of the protocol.

View Documentation

GETSET

Syntax

GETSET key value

Description

The GETSET command sets the value of a key and returns its old value. This operation is atomic.

View Documentation

GETEX

Syntax

GETEX key [EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds]

Description

The GETEX command retrieves the value of a key and can set an expiration time for it in the same command.

View Documentation

GETDEL

Syntax

GETDEL key

Description

The GETDEL command retrieves the value of a key and deletes it in the same atomic operation.

View Documentation

COMMAND

Syntax

COMMAND [GET | INFO | LIST | RESTORE]

Description

The COMMAND command provides information about the commands supported by the server, including details like the command name and the number of calls.

View Documentation

JSON.INGEST

Syntax

JSON.INGEST key json

Description

The JSON.INGEST command allows you to insert a JSON document into a specified key. If the key already holds a value, it will be overwritten.

View Documentation

JSON.GET

Syntax

JSON.GET key [path]

Description

The JSON.GET command retrieves a JSON value from the specified key. You can specify a path to get a nested value.

View Documentation

JSON.SET

Syntax

JSON.SET key path json

Description

The JSON.SET command sets a JSON value at a specified path in the key. If the key does not exist, a new JSON document is created.

View Documentation

JSON.DEL

Syntax

JSON.DEL key [path]

Description

The JSON.DEL command removes a JSON value at a specified path in the key. If the path does not exist, no action is taken.

View Documentation

JSON.TYPE

Syntax

JSON.TYPE key [path]

Description

The JSON.TYPE command returns the type of a JSON value at the specified path. If the path does not exist, it returns null.

View Documentation

JSON.NUMINCRBY

Syntax

JSON.NUMINCRBY key path increment

Description

The JSON.NUMINCRBY command increments a numeric value at a specified path in the key by the given increment.

View Documentation

JSON.MERGE

Syntax

JSON.MERGE dest key1 [key2 ...]

Description

The JSON.MERGE command merges multiple JSON documents into a single destination key.

View Documentation

JSON.KEYS

Syntax

JSON.KEYS key [path]

Description

The JSON.KEYS command retrieves all keys from a JSON document at a specified path.

View Documentation

JSON.FILTER

Syntax

JSON.FILTER key path filter

Description

The JSON.FILTER command filters JSON data based on a specified filter condition.

View Documentation