File tree Expand file tree Collapse file tree 9 files changed +132
-0
lines changed Expand file tree Collapse file tree 9 files changed +132
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ import * as MGET from '../commands/MGET';
72
72
import * as MIGRATE from '../commands/MIGRATE' ;
73
73
import * as MSET from '../commands/MSET' ;
74
74
import * as MSETNX from '../commands/MSETNX' ;
75
+ import * as OBJECT_ENCODING from '../commands/OBJECT_ENCODING' ;
76
+ import * as OBJECT_FREQ from '../commands/OBJECT_FREQ' ;
77
+ import * as OBJECT_IDLETIME from '../commands/OBJECT_IDLETIME' ;
78
+ import * as OBJECT_REFCOUNT from '../commands/OBJECT_REFCOUNT' ;
75
79
import * as PERSIST from '../commands/PERSIST' ;
76
80
import * as PEXPIRE from '../commands/PEXPIRE' ;
77
81
import * as PEXPIREAT from '../commands/PEXPIREAT' ;
@@ -324,6 +328,14 @@ export default {
324
328
mSet : MSET ,
325
329
MSETNX ,
326
330
mSetNX : MSETNX ,
331
+ OBJECT_ENCODING ,
332
+ objectEncoding : OBJECT_ENCODING ,
333
+ OBJECT_FREQ ,
334
+ objectFreq : OBJECT_FREQ ,
335
+ OBJECT_IDLETIME ,
336
+ objectIdleTime : OBJECT_IDLETIME ,
337
+ OBJECT_REFCOUNT ,
338
+ objectRefCount : OBJECT_REFCOUNT ,
327
339
PERSIST ,
328
340
persist : PERSIST ,
329
341
PEXPIRE ,
Original file line number Diff line number Diff line change
1
+ import { strict as assert } from 'assert' ;
2
+ import testUtils , { GLOBAL } from '../test-utils' ;
3
+ import { transformArguments } from './OBJECT_ENCODING' ;
4
+
5
+ describe ( 'OBJECT ENCODING' , ( ) => {
6
+ it ( 'transformArguments' , ( ) => {
7
+ assert . deepEqual (
8
+ transformArguments ( 'key' ) ,
9
+ [ 'OBJECT' , 'ENCODING' , 'key' ]
10
+ ) ;
11
+ } ) ;
12
+
13
+ testUtils . testWithClient ( 'client.objectEncoding' , async client => {
14
+ assert . equal (
15
+ await client . objectEncoding ( 'key' ) ,
16
+ null
17
+ ) ;
18
+ } , GLOBAL . SERVERS . OPEN ) ;
19
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { RedisCommandArgument , RedisCommandArguments } from '.' ;
2
+
3
+ export const FIRST_KEY_INDEX = 2 ;
4
+
5
+ export const IS_READ_ONLY = true ;
6
+
7
+ export function transformArguments ( key : RedisCommandArgument ) : RedisCommandArguments {
8
+ return [ 'OBJECT' , 'ENCODING' , key ] ;
9
+ }
10
+
11
+ export declare function transformReply ( ) : string | null ;
Original file line number Diff line number Diff line change
1
+ import { strict as assert } from 'assert' ;
2
+ import testUtils , { GLOBAL } from '../test-utils' ;
3
+ import { transformArguments } from './OBJECT_FREQ' ;
4
+
5
+ describe ( 'OBJECT FREQ' , ( ) => {
6
+ it ( 'transformArguments' , ( ) => {
7
+ assert . deepEqual (
8
+ transformArguments ( 'key' ) ,
9
+ [ 'OBJECT' , 'FREQ' , 'key' ]
10
+ ) ;
11
+ } ) ;
12
+
13
+ testUtils . testWithClient ( 'client.objectFreq' , async client => {
14
+ assert . equal (
15
+ await client . objectFreq ( 'key' ) ,
16
+ null
17
+ ) ;
18
+ } , GLOBAL . SERVERS . OPEN ) ;
19
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { RedisCommandArgument , RedisCommandArguments } from '.' ;
2
+
3
+ export const FIRST_KEY_INDEX = 2 ;
4
+
5
+ export const IS_READ_ONLY = true ;
6
+
7
+ export function transformArguments ( key : RedisCommandArgument ) : RedisCommandArguments {
8
+ return [ 'OBJECT' , 'FREQ' , key ] ;
9
+ }
10
+
11
+ export declare function transformReply ( ) : number | null ;
Original file line number Diff line number Diff line change
1
+ import { strict as assert } from 'assert' ;
2
+ import testUtils , { GLOBAL } from '../test-utils' ;
3
+ import { transformArguments } from './OBJECT_IDLETIME' ;
4
+
5
+ describe ( 'OBJECT IDLETIME' , ( ) => {
6
+ it ( 'transformArguments' , ( ) => {
7
+ assert . deepEqual (
8
+ transformArguments ( 'key' ) ,
9
+ [ 'OBJECT' , 'IDLETIME' , 'key' ]
10
+ ) ;
11
+ } ) ;
12
+
13
+ testUtils . testWithClient ( 'client.objectIdleTime' , async client => {
14
+ assert . equal (
15
+ await client . objectIdleTime ( 'key' ) ,
16
+ null
17
+ ) ;
18
+ } , GLOBAL . SERVERS . OPEN ) ;
19
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { RedisCommandArgument , RedisCommandArguments } from '.' ;
2
+
3
+ export const FIRST_KEY_INDEX = 2 ;
4
+
5
+ export const IS_READ_ONLY = true ;
6
+
7
+ export function transformArguments ( key : RedisCommandArgument ) : RedisCommandArguments {
8
+ return [ 'OBJECT' , 'IDLETIME' , key ] ;
9
+ }
10
+
11
+ export declare function transformReply ( ) : number | null ;
Original file line number Diff line number Diff line change
1
+ import { strict as assert } from 'assert' ;
2
+ import testUtils , { GLOBAL } from '../test-utils' ;
3
+ import { transformArguments } from './OBJECT_REFCOUNT' ;
4
+
5
+ describe ( 'OBJECT REFCOUNT' , ( ) => {
6
+ it ( 'transformArguments' , ( ) => {
7
+ assert . deepEqual (
8
+ transformArguments ( 'key' ) ,
9
+ [ 'OBJECT' , 'REFCOUNT' , 'key' ]
10
+ ) ;
11
+ } ) ;
12
+
13
+ testUtils . testWithClient ( 'client.objectRefCount' , async client => {
14
+ assert . equal (
15
+ await client . objectRefCount ( 'key' ) ,
16
+ null
17
+ ) ;
18
+ } , GLOBAL . SERVERS . OPEN ) ;
19
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { RedisCommandArgument , RedisCommandArguments } from '.' ;
2
+
3
+ export const FIRST_KEY_INDEX = 2 ;
4
+
5
+ export const IS_READ_ONLY = true ;
6
+
7
+ export function transformArguments ( key : RedisCommandArgument ) : RedisCommandArguments {
8
+ return [ 'OBJECT' , 'REFCOUNT' , key ] ;
9
+ }
10
+
11
+ export declare function transformReply ( ) : number | null ;
You can’t perform that action at this time.
0 commit comments