Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

fix #9 add graph.info() #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
node-version: ['18', '20']
redis-version: ['5', '6.0', '6.2', '7.0', '7.2']
redis-version: ['7.2']
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "falkordb",
"description": "A modern, high performance FalkorDB client",
"version": "5.0.1",
"version": "5.1.0",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
25 changes: 25 additions & 0 deletions packages/graph/lib/commands/INFO.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './INFO';

describe('INFO', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments(),
['GRAPH.INFO']
);
});

testUtils.testWithClient('client.graph.info', async client => {
assert.deepEqual(
await client.graph.info(),
[
"# Running queries",
[],
"# Waiting queries",
[],

]
);
}, GLOBAL.SERVERS.OPEN);
});
13 changes: 13 additions & 0 deletions packages/graph/lib/commands/INFO.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const IS_READ_ONLY = true;

export function transformArguments(section?: string): Array<string> {
const args = ['GRAPH.INFO'];

if (section) {
args.push(section);
}

return args;
}

export declare function transformReply(): string;
3 changes: 3 additions & 0 deletions packages/graph/lib/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ 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 INFO from './INFO';
import * as LIST from './LIST';
import * as PROFILE from './PROFILE';
import * as QUERY from './QUERY';
Expand All @@ -18,6 +19,8 @@ export default {
delete: DELETE,
EXPLAIN,
explain: EXPLAIN,
INFO,
info: INFO,
LIST,
list: LIST,
PROFILE,
Expand Down
Loading