0.0.7 • Published 3 years ago

redis-modules-cli v0.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Redis modules project

A project meant for connecting to Redis databases with modules easily, built with Typescript.

ReJSON module

Quick start

const client = new ReJSON({
    host: 'hostname',
    port: 43758,
});

//Connect to the Redis database with ReJSON module
await client.connect();

//Setting a key
const response = await client.set('key', '.', '{"x": 1, "str": "yy"}');
expect(response).to.equal('OK', 'The response of the set command');

//Disconnect from the Redis database with ReJSON module
await client.disconnect();

Functions list

FunctionsReJSON Command
delJSON.DEL
getJSON.GET
mgetJSON.MGET
setJSON.SET
typeJSON.TYPE
numincrbyJSON.NUMINCRBY
nummultbyJSON.NUMMULTBY
strappendJSON.STRAPPEND
strlenJSON.STRLEN
arrappendJSON.ARRAPPEND
arrindexJSON.ARRINDEX
arrinsertJSON.ARRINSERT
arrlenJSON.ARRLEN
arrpopJSON.ARRPOP
arrtrimJSON.ARRTRIM
objkeysJSON.OBJKEYS
objlenJSON.OBJLEN
debugJSON.DEBUG
forgetJSON.FORGET
respJSON.RESP

Redis Times Series module

Quick start

const client = new RedisTimesSeies({
    host: 'hostname',
    port: 43758,
});

//Connect to the Redis database with Redis Times Series module
await client.connect();

//Deleting a key
const response = await client.del('key');
expect(response).to.equal('OK', 'The response of the del command');

//Disconnect from the Redis database with Redis Times Series module
await client.disconnect();

Functions list

FunctionsRedis Times Series Command
createTS.CREATE
delDEL
alterTS.ALTER
addTS.ADD
maddTS.MADD
incrbyTS.INCRBY
decrbyTS.DECRBY
createruleTS.CREATERULE
deleteruleTS.DELETERULE
rangeTS.RANGE
revrangeTS.REVRANGE
mrangeTS.MRANGE
mrevrangeTS.MREVRANGE
getTS.GET
mgetTS.MGET
infoTS.INFO
queryindexTS.QUERYINDEX

Redisearch module

Quick start

const client = new RediSearch({
    host: 'hostname',
    port: 43758,
});

//Connect to the Redis database with Redisearch module
await client.connect();

//Deleting an alias
const response = await client.aliasdel('key');
expect(response).to.equal('OK', 'The response of the aliasdel command');

//Disconnect from the Redis database with Redisearch module
await client.disconnect();

Functions list

FunctionsRedisearch Command
createFT.CREATE
searchFT.SEARCH
aggregateFT.AGGREGATE
explainFT.EXPLAIN
explainCLIFT.EXPLAINCLI
alterFT.ALTER
dropindexFT.DROPINDEX
aliasaddFT.ALIASADD
aliasupdateFT.ALIASUPDATE
aliasdelFT.ALIASDEL
tagvalsFT.TAGVALS
sugaddFT.SUGADD
suggetFT.SUGGET
sugdelFT.SUGDEL
suglenFT.SUGLEN
synupdateFT.SYNUPDATE
syndumpFT.SYNDUMP
spellcheckFT.SPELLCHECK
dictaddFT.DICTADD
dictdelFT.DICTDEL
dictdumpFT.DICTDUMP
infoFT.INFO
configFT.CONFIG

RedisGraph module

Quick start

const client = new RedisGraph({
    host: 'hostname',
    port: 43758,
});

//Connect to the Redis database with RedisGraph module
await client.connect();

//Executing a query
const response = await client.query(graphName, 'CREATE (p:Person {name: \'Kurt\', age: 27}) RETURN p');
expect(response[2][0]).to.equal('Labels added: 1', 'The response of the GRAPH.QUERY command');

//Disconnect from the Redis database with RedisGraph module
await client.disconnect();

Functions list

FunctionsRedisGraph Command
queryGRAPH.QUERY
readonlyQueryGRAPH.RO_QUERY
profileGRAPH.PROFILE
deleteGRAPH.DELETE
explainGRAPH.EXPLAIN
slowlogGRAPH.SLOWLOG

RedisGears module

Quick start

const client = new RedisGears({
    host: 'hostname',
    port: 43758,
});

//Connect to the Redis database with RedisGears module
await client.connect();

//Executing a query
const response = await client.query(graphName, 'CREATE (p:Person {name: \'Kurt\', age: 27}) RETURN p');
expect(response[2][0]).to.equal('Labels added: 1', 'The response of the GRAPH.QUERY command');

//Disconnect from the Redis database with RedisGears module
await client.disconnect();

Functions list

FunctionsRedisGears Command
abortExecutionRG.ABORTEXECUTION
configGetRG.RG.CONFIGGET
configSetRG.RG.CONFIGSET
dropExecutionRG.DROPEXECUTION
dumpExecutionsRG.DUMPEXECUTIONS
dumpRegistrationsRG.DUMPREGISTRATIONS
getExecutionRG.GETEXECUTION
getResultsRG.GETRESULTS
getResultsBlockingRG.GETRESULTSBLOCKING
infoclusterRG.INFOCLUSTER
pyexecuteRG.PYEXECUTE
pystatsRG.PYSTATS
pydumpreqsRG.PYDUMPREQS
refreshClusterRG.REFRESHCLUSTER
triggerRG.TRIGGER
unregisterRG.UNREGISTER
0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago