1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-17 19:41:06 +03:00

add some missing commands

This commit is contained in:
leibale
2021-07-13 19:35:07 -04:00
parent bf44b0bf43
commit 4dca486a9c
43 changed files with 721 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
import { strict as assert } from 'assert';
import { describe } from 'mocha';
import { transformArguments } from './BGSAVE';
describe('BGSAVE', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(),
['BGSAVE']
);
});
it('with SCHEDULE', () => {
assert.deepEqual(
transformArguments({
SCHEDULE: true
}),
['BGSAVE', 'SCHEDULE']
);
});
});
});

17
lib/commands/BGSAVE.ts Normal file
View File

@@ -0,0 +1,17 @@
import { transformReplyString } from './generic-transformers';
interface BgSaveOptions {
SCHEDULE?: true;
}
export function transformArguments(options?: BgSaveOptions): Array<string> {
const args = ['BGSAVE'];
if (options?.SCHEDULE) {
args.push('SCHEDULE');
}
return args;
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,35 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './BITOP';
describe('BITOP', () => {
describe('transformArguments', () => {
it('single key', () => {
assert.deepEqual(
transformArguments('AND', 'destKey', 'key'),
['BITOP', 'AND', 'destKey', 'key']
);
});
it('multiple keys', () => {
assert.deepEqual(
transformArguments('AND', 'destKey', ['1', '2']),
['BITOP', 'AND', 'destKey', '1', '2']
);
});
});
itWithClient(TestRedisServers.OPEN, 'client.bitOp', async client => {
assert.equal(
await client.bitOp('AND', 'destKey', 'key'),
0
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.bitOp', async cluster => {
assert.equal(
await cluster.bitOp('AND', '{tag}destKey', '{tag}key'),
0
);
});
});

19
lib/commands/BITOP.ts Normal file
View File

@@ -0,0 +1,19 @@
import { transformReplyNumber } from './generic-transformers';
export const FIRST_KEY_INDEX = 2;
type BitOperations = 'AND' | 'OR' | 'XOR' | 'NOT';
export function transformArguments(operation: BitOperations, destKey: string, key: string | Array<string>): Array<string> {
const args = ['BITOP', operation, destKey];
if (typeof key === 'string') {
args.push(key);
} else {
args.push(...key);
}
return args;
}
export const transformReply = transformReplyNumber;

View File

@@ -0,0 +1,42 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './BITPOS';
describe('BITPOS', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments('key', 1),
['BITPOS', 'key', '1']
);
});
it('with start', () => {
assert.deepEqual(
transformArguments('key', 1, 1),
['BITPOS', 'key', '1', '1']
);
});
it('with start, end', () => {
assert.deepEqual(
transformArguments('key', 1, 1, -1),
['BITPOS', 'key', '1', '1', '-1']
);
});
});
itWithClient(TestRedisServers.OPEN, 'client.bitPos', async client => {
assert.equal(
await client.bitPos('key', 1, 1),
-1
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.bitPos', async cluster => {
assert.equal(
await cluster.bitPos('key', 1, 1),
-1
);
});
});

21
lib/commands/BITPOS.ts Normal file
View File

@@ -0,0 +1,21 @@
import { BitValue, transformReplyNumber } from './generic-transformers';
export const FIRST_KEY_INDEX = 1;
export const IS_READ_ONLY = true;
export function transformArguments(key: string, bit: BitValue, start?: number, end?: number): Array<string> {
const args = ['BITPOS', key, bit.toString()];
if (typeof start === 'number') {
args.push(start.toString());
}
if (typeof end === 'number') {
args.push(end.toString());
}
return args;
}
export const transformReply = transformReplyNumber;

View File

@@ -0,0 +1,11 @@
import { strict as assert } from 'assert';
import { transformArguments } from './CONFIG_GET';
describe('CONFIG GET', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('*'),
['CONFIG', 'GET', '*']
);
});
});

View File

@@ -0,0 +1,7 @@
import { transformReplyTuples } from './generic-transformers';
export function transformArguments(parameter: string): Array<string> {
return ['CONFIG', 'GET', parameter];
}
export const transformReply = transformReplyTuples;

View File

@@ -0,0 +1,11 @@
import { strict as assert } from 'assert';
import { transformArguments } from './CONFIG_RESETSTAT';
describe('CONFIG RESETSTAT', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments(),
['CONFIG', 'RESETSTAT']
);
});
});

View File

@@ -0,0 +1,7 @@
import { transformReplyString } from './generic-transformers';
export function transformArguments(): Array<string> {
return ['CONFIG', 'RESETSTAT'];
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,11 @@
import { strict as assert } from 'assert';
import { transformArguments } from './CONFIG_REWRITE';
describe('CONFIG REWRITE', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments(),
['CONFIG', 'REWRITE']
);
});
});

View File

@@ -0,0 +1,7 @@
import { transformReplyString } from './generic-transformers';
export function transformArguments(): Array<string> {
return ['CONFIG', 'REWRITE'];
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,11 @@
import { strict as assert } from 'assert';
import { transformArguments } from './CONFIG_SET';
describe('CONFIG SET', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('parameter', 'value'),
['CONFIG', 'SET', 'parameter', 'value']
);
});
});

View File

@@ -0,0 +1,7 @@
import { transformReplyString } from './generic-transformers';
export function transformArguments(parameter: string, value: string): Array<string> {
return ['CONFIG', 'SET', parameter, value];
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,11 @@
import { strict as assert } from 'assert';
import { transformArguments } from './DISCARD';
describe('DISCARD', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments(),
['DISCARD']
);
});
});

7
lib/commands/DISCARD.ts Normal file
View File

@@ -0,0 +1,7 @@
import { transformReplyString } from './generic-transformers';
export function transformArguments(): Array<string> {
return ['DISCARD'];
}
export const transformReply = transformReplyString;

26
lib/commands/ECHO.spec.ts Normal file
View File

@@ -0,0 +1,26 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './ECHO';
describe('ECHO', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('message'),
['ECHO', 'message']
);
});
itWithClient(TestRedisServers.OPEN, 'client.echo', async client => {
assert.equal(
await client.echo('message'),
'message'
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.echo', async cluster => {
assert.equal(
await cluster.echo('message'),
'message'
);
});
});

9
lib/commands/ECHO.ts Normal file
View File

@@ -0,0 +1,9 @@
import { transformReplyString } from './generic-transformers';
export const IS_READ_ONLY = true;
export function transformArguments(message: string): Array<string> {
return ['ECHO', message];
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,72 @@
import { strict as assert } from 'assert';
import { transformArguments } from './FAILOVER';
describe('FAILOVER', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(),
['FAILOVER']
);
});
describe('with TO', () => {
it('simple', () => {
assert.deepEqual(
transformArguments({
TO: {
host: 'host',
port: 6379
}
}),
['FAILOVER', 'TO', 'host', '6379']
);
});
it('with FORCE', () => {
assert.deepEqual(
transformArguments({
TO: {
host: 'host',
port: 6379,
FORCE: true
}
}),
['FAILOVER', 'TO', 'host', '6379', 'FORCE']
);
});
});
it('with ABORT', () => {
assert.deepEqual(
transformArguments({
ABORT: true
}),
['FAILOVER', 'ABORT']
);
});
it('with TIMEOUT', () => {
assert.deepEqual(
transformArguments({
TIMEOUT: 1
}),
['FAILOVER', 'TIMEOUT', '1']
);
});
it('with TO, ABORT, TIMEOUT', () => {
assert.deepEqual(
transformArguments({
TO: {
host: 'host',
port: 6379
},
ABORT: true,
TIMEOUT: 1
}),
['FAILOVER', 'TO', 'host', '6379', 'ABORT', 'TIMEOUT', '1']
);
});
});
});

35
lib/commands/FAILOVER.ts Normal file
View File

@@ -0,0 +1,35 @@
import { transformReplyString } from './generic-transformers';
interface FailoverOptions {
TO?: {
host: string;
port: number;
FORCE?: true;
};
ABORT?: true;
TIMEOUT?: number;
}
export function transformArguments(options?: FailoverOptions): Array<string> {
const args = ['FAILOVER'];
if (options?.TO) {
args.push('TO', options.TO.host, options.TO.port.toString());
if (options.TO.FORCE) {
args.push('FORCE');
}
}
if (options?.ABORT) {
args.push('ABORT');
}
if (options?.TIMEOUT) {
args.push('TIMEOUT', options.TIMEOUT.toString());
}
return args;
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,26 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './GETBIT';
describe('GETBIT', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 0),
['GETBIT', 'key', '0']
);
});
itWithClient(TestRedisServers.OPEN, 'client.getBit', async client => {
assert.equal(
await client.getBit('key', 0),
0
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.getBit', async cluster => {
assert.equal(
await cluster.getBit('key', 0),
0
);
});
});

11
lib/commands/GETBIT.ts Normal file
View File

@@ -0,0 +1,11 @@
import { transformReplyBit } from './generic-transformers';
export const FIRST_KEY_INDEX = 1;
export const IS_READ_ONLY = true;
export function transformArguments(key: string, offset: number): Array<string> {
return ['GETBIT', key, offset.toString()];
}
export const transformReply = transformReplyBit;

View File

@@ -0,0 +1,27 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './GETDEL';
describe('GETDEL', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key'),
['GETDEL', 'key']
);
});
itWithClient(TestRedisServers.OPEN, 'client.getDel', async client => {
assert.equal(
await client.getDel('key'),
null
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.getDel', async cluster => {
assert.equal(
await cluster.getDel('key'),
null
);
});
});

9
lib/commands/GETDEL.ts Normal file
View File

@@ -0,0 +1,9 @@
import { transformReplyStringNull } from './generic-transformers';
export const FIRST_KEY_INDEX = 1;
export function transformArguments(key: string): Array<string> {
return ['GETDEL', key];
}
export const transformReply = transformReplyStringNull;

View File

@@ -0,0 +1,27 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './GETRANGE';
describe('GETRANGE', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 0, -1),
['GETRANGE', 'key', '0', '-1']
);
});
itWithClient(TestRedisServers.OPEN, 'client.getRange', async client => {
assert.equal(
await client.getRange('key', 0, -1),
''
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.lTrim', async cluster => {
assert.equal(
await cluster.getRange('key', 0, -1),
''
);
});
});

11
lib/commands/GETRANGE.ts Normal file
View File

@@ -0,0 +1,11 @@
import { transformReplyString } from './generic-transformers';
export const FIRST_KEY_INDEX = 1;
export const IS_READ_ONLY = true;
export function transformArguments(key: string, start: number, end: number): Array<string> {
return ['GETRANGE', key, start.toString(), end.toString()];
}
export const transformReply = transformReplyString;

20
lib/commands/INFO.spec.ts Normal file
View File

@@ -0,0 +1,20 @@
import { strict as assert } from 'assert';
import { transformArguments } from './INFO';
describe('INFO', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(),
['INFO']
);
});
it('server section', () => {
assert.deepEqual(
transformArguments('server'),
['INFO', 'server']
);
});
});
});

15
lib/commands/INFO.ts Normal file
View File

@@ -0,0 +1,15 @@
import { transformReplyString } from './generic-transformers';
export const IS_READ_ONLY = true;
export function transformArguments(section?: string): Array<string> {
const args = ['INFO'];
if (section) {
args.push(section);
}
return args;
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,11 @@
import { strict as assert } from 'assert';
import { transformArguments } from './READWRITE';
describe('READWRITE', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments(),
['READWRITE']
);
});
});

View File

@@ -0,0 +1,7 @@
import { transformReplyString } from './generic-transformers';
export function transformArguments(): Array<string> {
return ['READWRITE'];
}
export const transformReply = transformReplyString;

View File

@@ -0,0 +1,26 @@
import { strict as assert } from 'assert';
import { TestRedisServers, itWithClient, TestRedisClusters, itWithCluster } from '../test-utils';
import { transformArguments } from './SETBIT';
describe('SETBIT', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments('key', 0, 1),
['SETBIT', 'key', '0', '1']
);
});
itWithClient(TestRedisServers.OPEN, 'client.setBit', async client => {
assert.equal(
await client.setBit('key', 0, 1),
0
);
});
itWithCluster(TestRedisClusters.OPEN, 'cluster.setBit', async cluster => {
assert.equal(
await cluster.setBit('key', 0, 1),
0
);
});
});

9
lib/commands/SETBIT.ts Normal file
View File

@@ -0,0 +1,9 @@
import { BitValue, transformReplyBit } from './generic-transformers';
export const FIRST_KEY_INDEX = 1;
export function transformArguments(key: string, offset: number, value: BitValue) {
return ['SETBIT', key, offset.toString(), value.toString()];
}
export const transformReply = transformReplyBit;

View File

@@ -0,0 +1,27 @@
import { strict as assert } from 'assert';
import { transformArguments } from './SHUTDOWN';
describe('SHUTDOWN', () => {
describe('transformArguments', () => {
it('simple', () => {
assert.deepEqual(
transformArguments(),
['SHUTDOWN']
);
});
it('NOSAVE', () => {
assert.deepEqual(
transformArguments('NOSAVE'),
['SHUTDOWN', 'NOSAVE']
);
});
it('SAVE', () => {
assert.deepEqual(
transformArguments('SAVE'),
['SHUTDOWN', 'SAVE']
);
});
});
});

13
lib/commands/SHUTDOWN.ts Normal file
View File

@@ -0,0 +1,13 @@
import { transformReplyVoid } from './generic-transformers';
export function transformArguments(mode?: 'NOSAVE' | 'SAVE'): Array<string> {
const args = ['SHUTDOWN'];
if (mode) {
args.push(mode);
}
return args;
}
export const transformReply = transformReplyVoid;

View File

@@ -0,0 +1,19 @@
import { strict as assert } from 'assert';
import { itWithClient, TestRedisServers } from '../test-utils';
import { transformArguments } from './SWAPDB';
describe('SWAPDB', () => {
it('transformArguments', () => {
assert.deepEqual(
transformArguments(0, 1),
['SWAPDB', '0', '1']
);
});
itWithClient(TestRedisServers.OPEN, 'client.swapDb', async client => {
assert.equal(
await client.swapDb(0, 1),
'OK'
);
});
});

7
lib/commands/SWAPDB.ts Normal file
View File

@@ -0,0 +1,7 @@
import { transformReplyString } from './generic-transformers';
export function transformArguments(index1: number, index2: number): Array<string> {
return ['SWAPDB', index1.toString(), index2.toString()];
}
export const transformReply = transformReplyString;

View File

@@ -3,7 +3,7 @@ import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './TIME'; import { transformArguments } from './TIME';
describe('TIME', () => { describe('TIME', () => {
describe('transformArguments', () => { it('transformArguments', () => {
assert.deepEqual( assert.deepEqual(
transformArguments(), transformArguments(),
['TIME'] ['TIME']

View File

@@ -3,7 +3,7 @@ import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './XGROUP_DESTROY'; import { transformArguments } from './XGROUP_DESTROY';
describe('XGROUP DESTROY', () => { describe('XGROUP DESTROY', () => {
describe('transformArguments', () => { it('transformArguments', () => {
assert.deepEqual( assert.deepEqual(
transformArguments('key', 'group'), transformArguments('key', 'group'),
['XGROUP', 'DESTROY', 'key', 'group'] ['XGROUP', 'DESTROY', 'key', 'group']

View File

@@ -3,7 +3,7 @@ import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments } from './XGROUP_SETID'; import { transformArguments } from './XGROUP_SETID';
describe('XGROUP SETID', () => { describe('XGROUP SETID', () => {
describe('transformArguments', () => { it('transformArguments', () => {
assert.deepEqual( assert.deepEqual(
transformArguments('key', 'group', '0'), transformArguments('key', 'group', '0'),
['XGROUP', 'SETID', 'key', 'group', '0'] ['XGROUP', 'SETID', 'key', 'group', '0']

View File

@@ -3,7 +3,7 @@ import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments, transformReply } from './XINFO_CONSUMERS'; import { transformArguments, transformReply } from './XINFO_CONSUMERS';
describe('XINFO CONSUMERS', () => { describe('XINFO CONSUMERS', () => {
describe('transformArguments', () => { it('transformArguments', () => {
assert.deepEqual( assert.deepEqual(
transformArguments('key', 'group'), transformArguments('key', 'group'),
['XINFO', 'CONSUMERS', 'key', 'group'] ['XINFO', 'CONSUMERS', 'key', 'group']

View File

@@ -3,7 +3,7 @@ import { TestRedisServers, itWithClient } from '../test-utils';
import { transformArguments, transformReply } from './XINFO_GROUPS'; import { transformArguments, transformReply } from './XINFO_GROUPS';
describe('XINFO GROUPS', () => { describe('XINFO GROUPS', () => {
describe('transformArguments', () => { it('transformArguments', () => {
assert.deepEqual( assert.deepEqual(
transformArguments('key'), transformArguments('key'),
['XINFO', 'GROUPS', 'key'] ['XINFO', 'GROUPS', 'key']

View File

@@ -38,6 +38,14 @@ export function transformReplyBooleanArray(reply: Array<number>): Array<boolean>
return reply.map(transformReplyBoolean); return reply.map(transformReplyBoolean);
} }
export type BitValue = 0 | 1;
export function transformReplyBit(reply: BitValue): BitValue {
return reply;
}
export function transformReplyVoid(): void {}
export interface ScanOptions { export interface ScanOptions {
MATCH?: string; MATCH?: string;
COUNT?: number; COUNT?: number;

View File

@@ -14,8 +14,11 @@ import * as APPEND from './APPEND';
import * as ASKING from './ASKING'; import * as ASKING from './ASKING';
import * as AUTH from './AUTH'; import * as AUTH from './AUTH';
import * as BGREWRITEAOF from './BGREWRITEAOF'; import * as BGREWRITEAOF from './BGREWRITEAOF';
import * as BGSAVE from './BGSAVE';
import * as BITCOUNT from './BITCOUNT'; import * as BITCOUNT from './BITCOUNT';
import * as BITFIELD from './BITFIELD'; import * as BITFIELD from './BITFIELD';
import * as BITOP from './BITOP';
import * as BITPOS from './BITPOS';
import * as BLMOVE from './BLMOVE'; import * as BLMOVE from './BLMOVE';
import * as BLPOP from './BLPOP'; import * as BLPOP from './BLPOP';
import * as BRPOP from './BRPOP'; import * as BRPOP from './BRPOP';
@@ -30,17 +33,27 @@ import * as CLUSTER_NODES from './CLUSTER_NODES';
import * as CLUSTER_MEET from './CLUSTER_MEET'; import * as CLUSTER_MEET from './CLUSTER_MEET';
import * as CLUSTER_RESET from './CLUSTER_RESET'; import * as CLUSTER_RESET from './CLUSTER_RESET';
import * as CLUSTER_SETSLOT from './CLUSTER_SETSLOT'; import * as CLUSTER_SETSLOT from './CLUSTER_SETSLOT';
import * as CONFIG_GET from './CONFIG_GET';
import * as CONFIG_RESETASTAT from './CONFIG_RESETSTAT';
import * as CONFIG_REWRITE from './CONFIG_REWRITE';
import * as CONFIG_SET from './CONFIG_SET';
import * as COPY from './COPY'; import * as COPY from './COPY';
import * as DECR from './DECR'; import * as DECR from './DECR';
import * as DECRBY from './DECRBY'; import * as DECRBY from './DECRBY';
import * as DEL from './DEL'; import * as DEL from './DEL';
import * as DISCARD from './DISCARD';
import * as DUMP from './DUMP'; import * as DUMP from './DUMP';
import * as ECHO from './ECHO';
import * as EXISTS from './EXISTS'; import * as EXISTS from './EXISTS';
import * as EXPIRE from './EXPIRE'; import * as EXPIRE from './EXPIRE';
import * as EXPIREAT from './EXPIREAT'; import * as EXPIREAT from './EXPIREAT';
import * as FAILOVER from './FAILOVER';
import * as FLUSHALL from './FLUSHALL'; import * as FLUSHALL from './FLUSHALL';
import * as FLUSHDB from './FLUSHDB'; import * as FLUSHDB from './FLUSHDB';
import * as GET from './GET'; import * as GET from './GET';
import * as GETBIT from './GETBIT';
import * as GETDEL from './GETDEL';
import * as GETRANGE from './GETRANGE';
import * as HDEL from './HDEL'; import * as HDEL from './HDEL';
import * as HEXISTS from './HEXISTS'; import * as HEXISTS from './HEXISTS';
import * as HGET from './HGET'; import * as HGET from './HGET';
@@ -61,6 +74,7 @@ import * as HVALS from './HVALS';
import * as INCR from './INCR'; import * as INCR from './INCR';
import * as INCRBY from './INCRBY'; import * as INCRBY from './INCRBY';
import * as INCRBYFLOAT from './INCRBYFLOAT'; import * as INCRBYFLOAT from './INCRBYFLOAT';
import * as INFO from './INFO';
import * as KEYS from './KEYS'; import * as KEYS from './KEYS';
import * as LASTSAVE from './LASTSAVE'; import * as LASTSAVE from './LASTSAVE';
import * as LINDEX from './LINDEX'; import * as LINDEX from './LINDEX';
@@ -94,6 +108,7 @@ import * as PTTL from './PTTL';
import * as PUBLISH from './PUBLISH'; import * as PUBLISH from './PUBLISH';
import * as RANDOMKEY from './RANDOMKEY'; import * as RANDOMKEY from './RANDOMKEY';
import * as READONLY from './READONLY'; import * as READONLY from './READONLY';
import * as READWRITE from './READWRITE';
import * as RENAME from './RENAME'; import * as RENAME from './RENAME';
import * as RENAMENX from './RENAMENX'; import * as RENAMENX from './RENAMENX';
import * as REPLICAOF from './REPLICAOF'; import * as REPLICAOF from './REPLICAOF';
@@ -109,7 +124,9 @@ import * as SCARD from './SCARD';
import * as SDIFF from './SDIFF'; import * as SDIFF from './SDIFF';
import * as SDIFFSTORE from './SDIFFSTORE'; import * as SDIFFSTORE from './SDIFFSTORE';
import * as SET from './SET'; import * as SET from './SET';
import * as SETBIT from './SETBIT';
import * as SETRANGE from './SETRANGE'; import * as SETRANGE from './SETRANGE';
import * as SHUTDOWN from './SHUTDOWN';
import * as SINTER from './SINTER'; import * as SINTER from './SINTER';
import * as SINTERSTORE from './SINTERSTORE'; import * as SINTERSTORE from './SINTERSTORE';
import * as SISMEMBER from './SISMEMBER'; import * as SISMEMBER from './SISMEMBER';
@@ -125,6 +142,7 @@ import * as SSCAN from './SSCAN';
import * as STRLEN from './STRLEN'; import * as STRLEN from './STRLEN';
import * as SUNION from './SUNION'; import * as SUNION from './SUNION';
import * as SUNIONSTORE from './SUNIONSTORE'; import * as SUNIONSTORE from './SUNIONSTORE';
import * as SWAPDB from './SWAPDB';
import * as TIME from './TIME'; import * as TIME from './TIME';
import * as TOUCH from './TOUCH'; import * as TOUCH from './TOUCH';
import * as TTL from './TTL'; import * as TTL from './TTL';
@@ -221,10 +239,16 @@ export default {
auth: AUTH, auth: AUTH,
BGREWRITEAOF, BGREWRITEAOF,
bgRewriteAof: BGREWRITEAOF, bgRewriteAof: BGREWRITEAOF,
BGSAVE,
bgSave: BGSAVE,
BITCOUNT, BITCOUNT,
bitCount: BITCOUNT, bitCount: BITCOUNT,
BITFIELD, BITFIELD,
bitField: BITFIELD, bitField: BITFIELD,
BITOP,
bitOp: BITOP,
BITPOS,
bitPos: BITPOS,
BLMOVE, BLMOVE,
blMove: BLMOVE, blMove: BLMOVE,
BLPOP, BLPOP,
@@ -253,6 +277,14 @@ export default {
clusterReset: CLUSTER_RESET, clusterReset: CLUSTER_RESET,
CLUSTER_SETSLOT, CLUSTER_SETSLOT,
clusterSetSlot: CLUSTER_SETSLOT, clusterSetSlot: CLUSTER_SETSLOT,
CONFIG_GET,
configGet: CONFIG_GET,
CONFIG_RESETASTAT,
configResetStat: CONFIG_RESETASTAT,
CONFIG_REWRITE,
configRewrite: CONFIG_REWRITE,
CONFIG_SET,
configSet: CONFIG_SET,
COPY, COPY,
copy: COPY, copy: COPY,
DECR, DECR,
@@ -261,20 +293,32 @@ export default {
decrBy: DECRBY, decrBy: DECRBY,
DEL, DEL,
del: DEL, del: DEL,
DISCARD,
discard: DISCARD,
DUMP, DUMP,
dump: DUMP, dump: DUMP,
ECHO,
echo: ECHO,
EXISTS, EXISTS,
exists: EXISTS, exists: EXISTS,
EXPIRE, EXPIRE,
expire: EXPIRE, expire: EXPIRE,
EXPIREAT, EXPIREAT,
expireAt: EXPIREAT, expireAt: EXPIREAT,
FAILOVER,
failover: FAILOVER,
FLUSHALL, FLUSHALL,
flushAll: FLUSHALL, flushAll: FLUSHALL,
FLUSHDB, FLUSHDB,
flushDb: FLUSHDB, flushDb: FLUSHDB,
GET, GET,
get: GET, get: GET,
GETBIT,
getBit: GETBIT,
GETDEL,
getDel: GETDEL,
GETRANGE,
getRange: GETRANGE,
HDEL, HDEL,
hDel: HDEL, hDel: HDEL,
HEXISTS, HEXISTS,
@@ -315,6 +359,8 @@ export default {
incrBy: INCRBY, incrBy: INCRBY,
INCRBYFLOAT, INCRBYFLOAT,
incrByFloat: INCRBYFLOAT, incrByFloat: INCRBYFLOAT,
INFO,
info: INFO,
KEYS, KEYS,
keys: KEYS, keys: KEYS,
LASTSAVE, LASTSAVE,
@@ -380,6 +426,8 @@ export default {
randomKey: RANDOMKEY, randomKey: RANDOMKEY,
READONLY, READONLY,
readonly: READONLY, readonly: READONLY,
READWRITE,
readwrite: READWRITE,
RENAME, RENAME,
rename: RENAME, rename: RENAME,
RENAMENX, RENAMENX,
@@ -414,8 +462,12 @@ export default {
sInterStore: SINTERSTORE, sInterStore: SINTERSTORE,
SET, SET,
set: SET, set: SET,
SETBIT,
setBit: SETBIT,
SETRANGE, SETRANGE,
setRange: SETRANGE, setRange: SETRANGE,
SHUTDOWN,
shutdown: SHUTDOWN,
SISMEMBER, SISMEMBER,
sIsMember: SISMEMBER, sIsMember: SISMEMBER,
SMEMBERS, SMEMBERS,
@@ -442,6 +494,8 @@ export default {
sUnion: SUNION, sUnion: SUNION,
SUNIONSTORE, SUNIONSTORE,
sUnionStore: SUNIONSTORE, sUnionStore: SUNIONSTORE,
SWAPDB,
swapDb: SWAPDB,
TIME, TIME,
time: TIME, time: TIME,
TOUCH, TOUCH,