Documentation

The documentation for Quick Redis

Commands

circle-info

All commands work with dotted notation

add(key, number)

This command adds a number to a key in the Redis database (if the key doesn't exist it will add from 0)

client.add('foo', 500).then(console.log) // -> 500

delete(key)

This command deletes a key from the Redis database (returns 0 if key doesn't exist, returns 1 if success)

client.set('foo', 'bar').then(console.log) // -> 'bar'

client.delete('foo').then(console.log) // -> 1

get(key)

This command returns the value of a key in the Redis database

has(key)

This command checks if a key exists in the Redis database

set(key, value)

This command sets the value of a key in the Redis database

subtract(key, number)

This command subtracts a number from a key in the Redis database (if the key doesn't exist it will subtract from 0)

Last updated