Support of Redis for Node.js


Objects

Icon Description
NodeJS Redis Connection
NodeJS Redis Collection
NodeJS Unknown Redis Connection
NodeJS Unknown Redis Collection

Supported libraries

Library require Versions
redis redis 0.x to 5.x
ioredis ioredis 0.x to 5.x
redis-fast-driver redis-fast-driver 0.x to 2.x
then-redis then-redis 0.x to 2.x
co-redis co-redis 0.x to 2.x
Link Type Supported APIs from
redis
Supported APIs from
ioredis
Supported APIs from
redis-fast-driver
Supported APIs from
then-redis
Supported APIs from
co-redis
useSelectLink get
hget
hgetall
lrange
smembers
get
hget
hgetall
lrange
smembers
get
hget
hgetall
lrange
smembers
zrange
scan
get
hget
hgetall
lrange
smembers
zrange
scan
mget
get
hget
hgetall
lrange
smembers
useInsertLink rpush
lpush
sadd
rpush
lpush
sadd
rpush
lpush
sadd
zadd
rpush
lpush
sadd
zadd
rpush
lpush
sadd
useUpdateLink set
hset
incr
hincr
incrby
hincrby
decr
hdecr
decrby
hdecrby
hmset
set
hset
incr
hincr
incrby
hincrby
decr
hdecr
decrby
hdecrby
hmset
set
hset
incr
hincr
incrby
hincrby
decr
hdecr
decrby
hdecrby
hmset
set
hset
incr
hincr
incrby
hincrby
decr
hdecr
decrby
hdecrby
hmset
mset
set
hset
incr
hincr
incrby
hincrby
decr
hdecr
decrby
hdecrby
hmset
useDeleteLink del del del del del

What results can you expect?

Some scenarios are shown below:

const redis = require("redis");
var client = redis.createClient('16', '192.168.1.52');

const hash_key = "hash key"
client0.set("string key", "string val", redis.print);

client0.hset(hash_key, "hashtest 1", "some value", redis.print);
client0.hset(["hash key", "hashtest 2", "some other value"], redis.print);

client0.get("string key", redis.print);
client0.get(new Buffer("hash key"), redis.print);

client0.rpush(['frameworks', 'angularjs', 'backbone'], function(err, reply) {
    console.log(reply); //prints 2
});

client0.lrange('frameworks', 0, -1, function(err, reply) {
    console.log(reply); // ['angularjs', 'backbone']
});

In this example, a ‘NodeJS Redis Connection’ and three ‘NodeJS Redis Collection’ objects are created. This extension creates three useSelect links, two useUpdate links and a useInsert link from code redis.js to the three collections corresponding.