You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Graph (#1887)
* init * implement graph commands * add graph to packages table * fix ts.infoDebug * fix redisearch tests * Update INFO_DEBUG.ts * fix INFO.spec.ts * test QUERY and SLOWLOG Co-authored-by: Avital-Fine <avital.fine@redis.com>
This commit is contained in:
49
packages/graph/lib/commands/index.ts
Normal file
49
packages/graph/lib/commands/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import * as CONFIG_GET from './CONFIG_GET';
|
||||
import * as CONFIG_SET from './CONFIG_SET';;
|
||||
import * as DELETE from './DELETE';
|
||||
import * as EXPLAIN from './EXPLAIN';
|
||||
import * as LIST from './LIST';
|
||||
import * as PROFILE from './PROFILE';
|
||||
import * as QUERY_RO from './QUERY_RO';
|
||||
import * as QUERY from './QUERY';
|
||||
import * as SLOWLOG from './SLOWLOG';
|
||||
import { RedisCommandArgument, RedisCommandArguments } from '@node-redis/client/dist/lib/commands';
|
||||
|
||||
export default {
|
||||
CONFIG_GET,
|
||||
configGet: CONFIG_GET,
|
||||
CONFIG_SET,
|
||||
configSet: CONFIG_SET,
|
||||
DELETE,
|
||||
delete: DELETE,
|
||||
EXPLAIN,
|
||||
explain: EXPLAIN,
|
||||
LIST,
|
||||
list: LIST,
|
||||
PROFILE,
|
||||
profile: PROFILE,
|
||||
QUERY_RO,
|
||||
queryRo: QUERY_RO,
|
||||
QUERY,
|
||||
query: QUERY,
|
||||
SLOWLOG,
|
||||
slowLog: SLOWLOG
|
||||
};
|
||||
|
||||
export function pushQueryArguments(
|
||||
args: RedisCommandArguments,
|
||||
graph: RedisCommandArgument,
|
||||
query: RedisCommandArgument,
|
||||
timeout?: number
|
||||
): RedisCommandArguments {
|
||||
args.push(
|
||||
graph,
|
||||
query
|
||||
);
|
||||
|
||||
if (timeout !== undefined) {
|
||||
args.push(timeout.toString());
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
Reference in New Issue
Block a user