Support of Redis for Node.js


Objects

IconDescription
NodeJS Redis Connection
NodeJS Redis Collection
NodeJS Unknown Redis Connection
NodeJS Unknown Redis Collection

Supported libraries

LibraryrequireVersions
redisredis0.x to 5.x
ioredisioredis0.x to 5.x
redis-fast-driverredis-fast-driver0.x to 2.x
then-redisthen-redis0.x to 2.x
co-redisco-redis0.x to 2.x
Link TypeSupported APIs from
redis
Supported APIs from
ioredis
Supported APIs from
redis-fast-driver
Supported APIs from
then-redis
Supported APIs from
co-redis
useSelectLinkget
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
useInsertLinkrpush
lpush
sadd
rpush
lpush
sadd
rpush
lpush
sadd
zadd
rpush
lpush
sadd
zadd
rpush
lpush
sadd
useUpdateLinkset
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
useDeleteLinkdeldeldeldeldel

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.