@valkey/valkey-glide 1.3.5-rc11 → 1.3.5-rc13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -11
- package/build-ts/BaseClient.d.ts +4 -9
- package/build-ts/BaseClient.js +251 -229
- package/build-ts/Batch.d.ts +5 -5
- package/build-ts/Batch.js +219 -220
- package/build-ts/Commands.d.ts +1 -2
- package/build-ts/Commands.js +4 -5
- package/build-ts/GlideClient.d.ts +1 -3
- package/build-ts/GlideClient.js +53 -54
- package/build-ts/GlideClusterClient.d.ts +1 -4
- package/build-ts/GlideClusterClient.js +52 -54
- package/build-ts/Logger.js +3 -3
- package/build-ts/OpenTelemetry.d.ts +87 -0
- package/build-ts/OpenTelemetry.js +117 -0
- package/build-ts/ProtobufMessage.d.ts +12 -81
- package/build-ts/ProtobufMessage.js +42 -177
- package/build-ts/index.d.ts +2 -2
- package/build-ts/index.js +2 -25
- package/build-ts/native.d.ts +66 -0
- package/build-ts/native.js +6 -0
- package/build-ts/server-modules/GlideFt.d.ts +1 -4
- package/build-ts/server-modules/GlideFt.js +10 -11
- package/build-ts/server-modules/GlideFtOptions.d.ts +1 -2
- package/build-ts/server-modules/GlideJson.d.ts +1 -3
- package/build-ts/server-modules/GlideJson.js +2 -2
- package/package.json +7 -7
package/build-ts/Batch.js
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Transaction = exports.ClusterTransaction = exports.ClusterBatch = exports.Batch = exports.BaseBatch = void 0;
|
|
7
|
-
const
|
|
8
|
-
const Commands_1 = require("./Commands");
|
|
7
|
+
const _1 = require(".");
|
|
9
8
|
/**
|
|
10
9
|
* Base class encompassing shared commands for both standalone and cluster mode implementations in a Batch.
|
|
11
10
|
* Batches allow the execution of a group of commands in a single step.
|
|
@@ -59,7 +58,7 @@ class BaseBatch {
|
|
|
59
58
|
* Command Response - If `key` exists, returns the value of `key`. Otherwise, return `null`.
|
|
60
59
|
*/
|
|
61
60
|
get(key) {
|
|
62
|
-
return this.addAndReturn((0,
|
|
61
|
+
return this.addAndReturn((0, _1.createGet)(key));
|
|
63
62
|
}
|
|
64
63
|
/**
|
|
65
64
|
* Get the value of `key` and optionally set its expiration. `GETEX` is similar to {@link get}.
|
|
@@ -75,7 +74,7 @@ class BaseBatch {
|
|
|
75
74
|
* Command Response - If `key` exists, returns the value of `key` as a `string`. Otherwise, return `null`.
|
|
76
75
|
*/
|
|
77
76
|
getex(key, options) {
|
|
78
|
-
return this.addAndReturn((0,
|
|
77
|
+
return this.addAndReturn((0, _1.createGetEx)(key, options));
|
|
79
78
|
}
|
|
80
79
|
/**
|
|
81
80
|
* Gets a string value associated with the given `key`and deletes the key.
|
|
@@ -87,7 +86,7 @@ class BaseBatch {
|
|
|
87
86
|
* Command Response - If `key` exists, returns the `value` of `key`. Otherwise, return `null`.
|
|
88
87
|
*/
|
|
89
88
|
getdel(key) {
|
|
90
|
-
return this.addAndReturn((0,
|
|
89
|
+
return this.addAndReturn((0, _1.createGetDel)(key));
|
|
91
90
|
}
|
|
92
91
|
/**
|
|
93
92
|
* Returns the substring of the string value stored at `key`, determined by the byte offsets
|
|
@@ -105,7 +104,7 @@ class BaseBatch {
|
|
|
105
104
|
* Command Response - substring extracted from the value stored at `key`.
|
|
106
105
|
*/
|
|
107
106
|
getrange(key, start, end) {
|
|
108
|
-
return this.addAndReturn((0,
|
|
107
|
+
return this.addAndReturn((0, _1.createGetRange)(key, start, end));
|
|
109
108
|
}
|
|
110
109
|
/** Set the given key with the given value. Return value is dependent on the passed options.
|
|
111
110
|
* @see {@link https://valkey.io/commands/set/|valkey.io} for details.
|
|
@@ -119,7 +118,7 @@ class BaseBatch {
|
|
|
119
118
|
* If `returnOldValue` is set, return the old value as a string.
|
|
120
119
|
*/
|
|
121
120
|
set(key, value, options) {
|
|
122
|
-
return this.addAndReturn((0,
|
|
121
|
+
return this.addAndReturn((0, _1.createSet)(key, value, options));
|
|
123
122
|
}
|
|
124
123
|
/**
|
|
125
124
|
* Pings the server.
|
|
@@ -133,7 +132,7 @@ class BaseBatch {
|
|
|
133
132
|
* Command Response - `"PONG"` if `message` is not provided, otherwise return a copy of `message`.
|
|
134
133
|
*/
|
|
135
134
|
ping(message) {
|
|
136
|
-
return this.addAndReturn((0,
|
|
135
|
+
return this.addAndReturn((0, _1.createPing)(message));
|
|
137
136
|
}
|
|
138
137
|
/**
|
|
139
138
|
* Gets information and statistics about the server.
|
|
@@ -148,7 +147,7 @@ class BaseBatch {
|
|
|
148
147
|
* Command Response - A string containing the information for the sections requested.
|
|
149
148
|
*/
|
|
150
149
|
info(sections) {
|
|
151
|
-
return this.addAndReturn((0,
|
|
150
|
+
return this.addAndReturn((0, _1.createInfo)(sections));
|
|
152
151
|
}
|
|
153
152
|
/**
|
|
154
153
|
* Removes the specified keys. A key is ignored if it does not exist.
|
|
@@ -160,7 +159,7 @@ class BaseBatch {
|
|
|
160
159
|
* Command Response - The number of keys that were removed.
|
|
161
160
|
*/
|
|
162
161
|
del(keys) {
|
|
163
|
-
return this.addAndReturn((0,
|
|
162
|
+
return this.addAndReturn((0, _1.createDel)(keys));
|
|
164
163
|
}
|
|
165
164
|
/**
|
|
166
165
|
* Serialize the value stored at `key` in a Valkey-specific format and return it to the user.
|
|
@@ -173,7 +172,7 @@ class BaseBatch {
|
|
|
173
172
|
* Command Response - The serialized value of the data stored at `key`. If `key` does not exist, `null` will be returned.
|
|
174
173
|
*/
|
|
175
174
|
dump(key) {
|
|
176
|
-
return this.addAndReturn((0,
|
|
175
|
+
return this.addAndReturn((0, _1.createDump)(key));
|
|
177
176
|
}
|
|
178
177
|
/**
|
|
179
178
|
* Create a `key` associated with a `value` that is obtained by deserializing the provided
|
|
@@ -190,7 +189,7 @@ class BaseBatch {
|
|
|
190
189
|
* Command Response - Return "OK" if the `key` was successfully restored with a `value`.
|
|
191
190
|
*/
|
|
192
191
|
restore(key, ttl, value, options) {
|
|
193
|
-
return this.addAndReturn((0,
|
|
192
|
+
return this.addAndReturn((0, _1.createRestore)(key, ttl, value, options));
|
|
194
193
|
}
|
|
195
194
|
/**
|
|
196
195
|
* Gets the name of the connection on which the batch is being executed.
|
|
@@ -200,7 +199,7 @@ class BaseBatch {
|
|
|
200
199
|
* Command Response - The name of the client connection as a string if a name is set, or null if no name is assigned.
|
|
201
200
|
*/
|
|
202
201
|
clientGetName() {
|
|
203
|
-
return this.addAndReturn((0,
|
|
202
|
+
return this.addAndReturn((0, _1.createClientGetName)());
|
|
204
203
|
}
|
|
205
204
|
/**
|
|
206
205
|
* Rewrites the configuration file with the current configuration.
|
|
@@ -210,7 +209,7 @@ class BaseBatch {
|
|
|
210
209
|
* Command Response - "OK" when the configuration was rewritten properly. Otherwise, the command fails with an error.
|
|
211
210
|
*/
|
|
212
211
|
configRewrite() {
|
|
213
|
-
return this.addAndReturn((0,
|
|
212
|
+
return this.addAndReturn((0, _1.createConfigRewrite)());
|
|
214
213
|
}
|
|
215
214
|
/**
|
|
216
215
|
* Resets the statistics reported by Valkey using the `INFO` and `LATENCY HISTOGRAM` commands.
|
|
@@ -220,7 +219,7 @@ class BaseBatch {
|
|
|
220
219
|
* Command Response - always "OK".
|
|
221
220
|
*/
|
|
222
221
|
configResetStat() {
|
|
223
|
-
return this.addAndReturn((0,
|
|
222
|
+
return this.addAndReturn((0, _1.createConfigResetStat)());
|
|
224
223
|
}
|
|
225
224
|
/** Retrieve the values of multiple keys.
|
|
226
225
|
* @see {@link https://valkey.io/commands/mget/|valkey.io} for details.
|
|
@@ -231,7 +230,7 @@ class BaseBatch {
|
|
|
231
230
|
* its corresponding value in the list will be null.
|
|
232
231
|
*/
|
|
233
232
|
mget(keys) {
|
|
234
|
-
return this.addAndReturn((0,
|
|
233
|
+
return this.addAndReturn((0, _1.createMGet)(keys));
|
|
235
234
|
}
|
|
236
235
|
/** Set multiple keys to multiple values in a single atomic operation.
|
|
237
236
|
* @see {@link https://valkey.io/commands/mset/|valkey.io} for details.
|
|
@@ -241,7 +240,7 @@ class BaseBatch {
|
|
|
241
240
|
* Command Response - always "OK".
|
|
242
241
|
*/
|
|
243
242
|
mset(keysAndValues) {
|
|
244
|
-
return this.addAndReturn((0,
|
|
243
|
+
return this.addAndReturn((0, _1.createMSet)((0, _1.convertGlideRecord)(keysAndValues)));
|
|
245
244
|
}
|
|
246
245
|
/**
|
|
247
246
|
* Sets multiple keys to values if the key does not exist. The operation is atomic, and if one or
|
|
@@ -253,7 +252,7 @@ class BaseBatch {
|
|
|
253
252
|
* Command Response - `true` if all keys were set. `false` if no key was set.
|
|
254
253
|
*/
|
|
255
254
|
msetnx(keysAndValues) {
|
|
256
|
-
return this.addAndReturn((0,
|
|
255
|
+
return this.addAndReturn((0, _1.createMSetNX)((0, _1.convertGlideRecord)(keysAndValues)));
|
|
257
256
|
}
|
|
258
257
|
/** Increments the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
|
|
259
258
|
* @see {@link https://valkey.io/commands/incr/|valkey.io} for details.
|
|
@@ -263,7 +262,7 @@ class BaseBatch {
|
|
|
263
262
|
* Command Response - the value of `key` after the increment.
|
|
264
263
|
*/
|
|
265
264
|
incr(key) {
|
|
266
|
-
return this.addAndReturn((0,
|
|
265
|
+
return this.addAndReturn((0, _1.createIncr)(key));
|
|
267
266
|
}
|
|
268
267
|
/** Increments the number stored at `key` by `amount`. If `key` does not exist, it is set to 0 before performing the operation.
|
|
269
268
|
* @see {@link https://valkey.io/commands/incrby/|valkey.io} for details.
|
|
@@ -274,7 +273,7 @@ class BaseBatch {
|
|
|
274
273
|
* Command Response - the value of `key` after the increment.
|
|
275
274
|
*/
|
|
276
275
|
incrBy(key, amount) {
|
|
277
|
-
return this.addAndReturn((0,
|
|
276
|
+
return this.addAndReturn((0, _1.createIncrBy)(key, amount));
|
|
278
277
|
}
|
|
279
278
|
/** Increment the string representing a floating point number stored at `key` by `amount`.
|
|
280
279
|
* By using a negative amount value, the result is that the value stored at `key` is decremented.
|
|
@@ -288,7 +287,7 @@ class BaseBatch {
|
|
|
288
287
|
*
|
|
289
288
|
*/
|
|
290
289
|
incrByFloat(key, amount) {
|
|
291
|
-
return this.addAndReturn((0,
|
|
290
|
+
return this.addAndReturn((0, _1.createIncrByFloat)(key, amount));
|
|
292
291
|
}
|
|
293
292
|
/**
|
|
294
293
|
* Returns the current connection ID.
|
|
@@ -298,7 +297,7 @@ class BaseBatch {
|
|
|
298
297
|
* Command Response - The ID of the connection.
|
|
299
298
|
*/
|
|
300
299
|
clientId() {
|
|
301
|
-
return this.addAndReturn((0,
|
|
300
|
+
return this.addAndReturn((0, _1.createClientId)());
|
|
302
301
|
}
|
|
303
302
|
/** Decrements the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
|
|
304
303
|
* @see {@link https://valkey.io/commands/decr/|valkey.io} for details.
|
|
@@ -308,7 +307,7 @@ class BaseBatch {
|
|
|
308
307
|
* Command Response - the value of `key` after the decrement.
|
|
309
308
|
*/
|
|
310
309
|
decr(key) {
|
|
311
|
-
return this.addAndReturn((0,
|
|
310
|
+
return this.addAndReturn((0, _1.createDecr)(key));
|
|
312
311
|
}
|
|
313
312
|
/** Decrements the number stored at `key` by `amount`. If `key` does not exist, it is set to 0 before performing the operation.
|
|
314
313
|
* @see {@link https://valkey.io/commands/decrby/|valkey.io} for details.
|
|
@@ -319,7 +318,7 @@ class BaseBatch {
|
|
|
319
318
|
* Command Response - the value of `key` after the decrement.
|
|
320
319
|
*/
|
|
321
320
|
decrBy(key, amount) {
|
|
322
|
-
return this.addAndReturn((0,
|
|
321
|
+
return this.addAndReturn((0, _1.createDecrBy)(key, amount));
|
|
323
322
|
}
|
|
324
323
|
/**
|
|
325
324
|
* Perform a bitwise operation between multiple keys (containing string values) and store the result in the
|
|
@@ -334,7 +333,7 @@ class BaseBatch {
|
|
|
334
333
|
* Command Response - The size of the string stored in `destination`.
|
|
335
334
|
*/
|
|
336
335
|
bitop(operation, destination, keys) {
|
|
337
|
-
return this.addAndReturn((0,
|
|
336
|
+
return this.addAndReturn((0, _1.createBitOp)(operation, destination, keys));
|
|
338
337
|
}
|
|
339
338
|
/**
|
|
340
339
|
* Returns the bit value at `offset` in the string value stored at `key`. `offset` must be greater than or equal
|
|
@@ -349,7 +348,7 @@ class BaseBatch {
|
|
|
349
348
|
* `offset` exceeds the length of the string.
|
|
350
349
|
*/
|
|
351
350
|
getbit(key, offset) {
|
|
352
|
-
return this.addAndReturn((0,
|
|
351
|
+
return this.addAndReturn((0, _1.createGetBit)(key, offset));
|
|
353
352
|
}
|
|
354
353
|
/**
|
|
355
354
|
* Sets or clears the bit at `offset` in the string value stored at `key`. The `offset` is a zero-based index, with
|
|
@@ -366,7 +365,7 @@ class BaseBatch {
|
|
|
366
365
|
* Command Response - The bit value that was previously stored at `offset`.
|
|
367
366
|
*/
|
|
368
367
|
setbit(key, offset, value) {
|
|
369
|
-
return this.addAndReturn((0,
|
|
368
|
+
return this.addAndReturn((0, _1.createSetBit)(key, offset, value));
|
|
370
369
|
}
|
|
371
370
|
/**
|
|
372
371
|
* Returns the position of the first bit matching the given `bit` value. The optional starting offset
|
|
@@ -384,7 +383,7 @@ class BaseBatch {
|
|
|
384
383
|
* If `start` was provided, the search begins at the offset indicated by `start`.
|
|
385
384
|
*/
|
|
386
385
|
bitpos(key, bit, options) {
|
|
387
|
-
return this.addAndReturn((0,
|
|
386
|
+
return this.addAndReturn((0, _1.createBitPos)(key, bit, options));
|
|
388
387
|
}
|
|
389
388
|
/**
|
|
390
389
|
* Reads or modifies the array of bits representing the string that is held at `key` based on the specified
|
|
@@ -411,7 +410,7 @@ class BaseBatch {
|
|
|
411
410
|
* does not contribute a value to the array response.
|
|
412
411
|
*/
|
|
413
412
|
bitfield(key, subcommands) {
|
|
414
|
-
return this.addAndReturn((0,
|
|
413
|
+
return this.addAndReturn((0, _1.createBitField)(key, subcommands));
|
|
415
414
|
}
|
|
416
415
|
/**
|
|
417
416
|
* Reads the array of bits representing the string that is held at `key` based on the specified `subcommands`.
|
|
@@ -426,7 +425,7 @@ class BaseBatch {
|
|
|
426
425
|
*
|
|
427
426
|
*/
|
|
428
427
|
bitfieldReadOnly(key, subcommands) {
|
|
429
|
-
return this.addAndReturn((0,
|
|
428
|
+
return this.addAndReturn((0, _1.createBitField)(key, subcommands, true));
|
|
430
429
|
}
|
|
431
430
|
/**
|
|
432
431
|
* Reads the configuration parameters of the running server.
|
|
@@ -440,7 +439,7 @@ class BaseBatch {
|
|
|
440
439
|
*
|
|
441
440
|
*/
|
|
442
441
|
configGet(parameters) {
|
|
443
|
-
return this.addAndReturn((0,
|
|
442
|
+
return this.addAndReturn((0, _1.createConfigGet)(parameters));
|
|
444
443
|
}
|
|
445
444
|
/**
|
|
446
445
|
* Sets configuration parameters to the specified values.
|
|
@@ -453,7 +452,7 @@ class BaseBatch {
|
|
|
453
452
|
* Command Response - "OK" when the configuration was set properly. Otherwise, the command fails with an error.
|
|
454
453
|
*/
|
|
455
454
|
configSet(parameters) {
|
|
456
|
-
return this.addAndReturn((0,
|
|
455
|
+
return this.addAndReturn((0, _1.createConfigSet)(parameters));
|
|
457
456
|
}
|
|
458
457
|
/** Retrieve the value associated with `field` in the hash stored at `key`.
|
|
459
458
|
* @see {@link https://valkey.io/commands/hget/|valkey.io} for details.
|
|
@@ -464,7 +463,7 @@ class BaseBatch {
|
|
|
464
463
|
* Command Response - the value associated with `field`, or null when `field` is not present in the hash or `key` does not exist.
|
|
465
464
|
*/
|
|
466
465
|
hget(key, field) {
|
|
467
|
-
return this.addAndReturn((0,
|
|
466
|
+
return this.addAndReturn((0, _1.createHGet)(key, field));
|
|
468
467
|
}
|
|
469
468
|
/** Sets the specified fields to their respective values in the hash stored at `key`.
|
|
470
469
|
* @see {@link https://valkey.io/commands/hset/|valkey.io} for details.
|
|
@@ -476,7 +475,7 @@ class BaseBatch {
|
|
|
476
475
|
* Command Response - The number of fields that were added.
|
|
477
476
|
*/
|
|
478
477
|
hset(key, fieldsAndValues) {
|
|
479
|
-
return this.addAndReturn((0,
|
|
478
|
+
return this.addAndReturn((0, _1.createHSet)(key, (0, _1.convertFieldsAndValuesToHashDataType)(fieldsAndValues)));
|
|
480
479
|
}
|
|
481
480
|
/**
|
|
482
481
|
* Returns all field names in the hash stored at `key`.
|
|
@@ -488,7 +487,7 @@ class BaseBatch {
|
|
|
488
487
|
* Command Response - A list of field names for the hash, or an empty list when the key does not exist.
|
|
489
488
|
*/
|
|
490
489
|
hkeys(key) {
|
|
491
|
-
return this.addAndReturn((0,
|
|
490
|
+
return this.addAndReturn((0, _1.createHKeys)(key));
|
|
492
491
|
}
|
|
493
492
|
/** Sets `field` in the hash stored at `key` to `value`, only if `field` does not yet exist.
|
|
494
493
|
* If `key` does not exist, a new key holding a hash is created.
|
|
@@ -502,7 +501,7 @@ class BaseBatch {
|
|
|
502
501
|
* Command Response - `true` if the field was set, `false` if the field already existed and was not set.
|
|
503
502
|
*/
|
|
504
503
|
hsetnx(key, field, value) {
|
|
505
|
-
return this.addAndReturn((0,
|
|
504
|
+
return this.addAndReturn((0, _1.createHSetNX)(key, field, value));
|
|
506
505
|
}
|
|
507
506
|
/** Removes the specified fields from the hash stored at `key`.
|
|
508
507
|
* Specified fields that do not exist within this hash are ignored.
|
|
@@ -515,7 +514,7 @@ class BaseBatch {
|
|
|
515
514
|
* If `key` does not exist, it is treated as an empty hash and it returns 0.
|
|
516
515
|
*/
|
|
517
516
|
hdel(key, fields) {
|
|
518
|
-
return this.addAndReturn((0,
|
|
517
|
+
return this.addAndReturn((0, _1.createHDel)(key, fields));
|
|
519
518
|
}
|
|
520
519
|
/** Returns the values associated with the specified fields in the hash stored at `key`.
|
|
521
520
|
* @see {@link https://valkey.io/commands/hmget/|valkey.io} for details.
|
|
@@ -528,7 +527,7 @@ class BaseBatch {
|
|
|
528
527
|
* If `key` does not exist, it is treated as an empty hash and it returns a list of null values.
|
|
529
528
|
*/
|
|
530
529
|
hmget(key, fields) {
|
|
531
|
-
return this.addAndReturn((0,
|
|
530
|
+
return this.addAndReturn((0, _1.createHMGet)(key, fields));
|
|
532
531
|
}
|
|
533
532
|
/** Returns if `field` is an existing field in the hash stored at `key`.
|
|
534
533
|
* @see {@link https://valkey.io/commands/hexists/|valkey.io} for details.
|
|
@@ -540,7 +539,7 @@ class BaseBatch {
|
|
|
540
539
|
* the command response will be `false`.
|
|
541
540
|
*/
|
|
542
541
|
hexists(key, field) {
|
|
543
|
-
return this.addAndReturn((0,
|
|
542
|
+
return this.addAndReturn((0, _1.createHExists)(key, field));
|
|
544
543
|
}
|
|
545
544
|
/**
|
|
546
545
|
* Returns all fields and values of the hash stored at `key`.
|
|
@@ -553,7 +552,7 @@ class BaseBatch {
|
|
|
553
552
|
* If `key` does not exist, it returns an empty list.
|
|
554
553
|
*/
|
|
555
554
|
hgetall(key) {
|
|
556
|
-
return this.addAndReturn((0,
|
|
555
|
+
return this.addAndReturn((0, _1.createHGetAll)(key));
|
|
557
556
|
}
|
|
558
557
|
/** Increments the number stored at `field` in the hash stored at `key` by `increment`.
|
|
559
558
|
* By using a negative increment value, the value stored at `field` in the hash stored at `key` is decremented.
|
|
@@ -567,7 +566,7 @@ class BaseBatch {
|
|
|
567
566
|
* Command Response - the value of `field` in the hash stored at `key` after the increment.
|
|
568
567
|
*/
|
|
569
568
|
hincrBy(key, field, amount) {
|
|
570
|
-
return this.addAndReturn((0,
|
|
569
|
+
return this.addAndReturn((0, _1.createHIncrBy)(key, field, amount));
|
|
571
570
|
}
|
|
572
571
|
/** Increment the string representing a floating point number stored at `field` in the hash stored at `key` by `increment`.
|
|
573
572
|
* By using a negative increment value, the value stored at `field` in the hash stored at `key` is decremented.
|
|
@@ -581,7 +580,7 @@ class BaseBatch {
|
|
|
581
580
|
* Command Response - the value of `field` in the hash stored at `key` after the increment.
|
|
582
581
|
*/
|
|
583
582
|
hincrByFloat(key, field, amount) {
|
|
584
|
-
return this.addAndReturn((0,
|
|
583
|
+
return this.addAndReturn((0, _1.createHIncrByFloat)(key, field, amount));
|
|
585
584
|
}
|
|
586
585
|
/** Returns the number of fields contained in the hash stored at `key`.
|
|
587
586
|
* @see {@link https://valkey.io/commands/hlen/|valkey.io} for details.
|
|
@@ -591,7 +590,7 @@ class BaseBatch {
|
|
|
591
590
|
* Command Response - The number of fields in the hash, or 0 when the key does not exist.
|
|
592
591
|
*/
|
|
593
592
|
hlen(key) {
|
|
594
|
-
return this.addAndReturn((0,
|
|
593
|
+
return this.addAndReturn((0, _1.createHLen)(key));
|
|
595
594
|
}
|
|
596
595
|
/** Returns all values in the hash stored at key.
|
|
597
596
|
* @see {@link https://valkey.io/commands/hvals/|valkey.io} for details.
|
|
@@ -601,7 +600,7 @@ class BaseBatch {
|
|
|
601
600
|
* Command Response - a list of values in the hash, or an empty list when the key does not exist.
|
|
602
601
|
*/
|
|
603
602
|
hvals(key) {
|
|
604
|
-
return this.addAndReturn((0,
|
|
603
|
+
return this.addAndReturn((0, _1.createHVals)(key));
|
|
605
604
|
}
|
|
606
605
|
/**
|
|
607
606
|
* Returns the string length of the value associated with `field` in the hash stored at `key`.
|
|
@@ -614,7 +613,7 @@ class BaseBatch {
|
|
|
614
613
|
* Command Response - The string length or `0` if `field` or `key` does not exist.
|
|
615
614
|
*/
|
|
616
615
|
hstrlen(key, field) {
|
|
617
|
-
return this.addAndReturn((0,
|
|
616
|
+
return this.addAndReturn((0, _1.createHStrlen)(key, field));
|
|
618
617
|
}
|
|
619
618
|
/**
|
|
620
619
|
* Returns a random field name from the hash value stored at `key`.
|
|
@@ -628,7 +627,7 @@ class BaseBatch {
|
|
|
628
627
|
* the key does not exist.
|
|
629
628
|
*/
|
|
630
629
|
hrandfield(key) {
|
|
631
|
-
return this.addAndReturn((0,
|
|
630
|
+
return this.addAndReturn((0, _1.createHRandField)(key));
|
|
632
631
|
}
|
|
633
632
|
/**
|
|
634
633
|
* Iterates incrementally over a hash.
|
|
@@ -647,7 +646,7 @@ class BaseBatch {
|
|
|
647
646
|
* If `options.noValues` is set to `true`, the second element will only contain the fields without the values.
|
|
648
647
|
*/
|
|
649
648
|
hscan(key, cursor, options) {
|
|
650
|
-
return this.addAndReturn((0,
|
|
649
|
+
return this.addAndReturn((0, _1.createHScan)(key, cursor, options));
|
|
651
650
|
}
|
|
652
651
|
/**
|
|
653
652
|
* Retrieves up to `count` random field names from the hash value stored at `key`.
|
|
@@ -664,7 +663,7 @@ class BaseBatch {
|
|
|
664
663
|
* or an `empty array` when the key does not exist.
|
|
665
664
|
*/
|
|
666
665
|
hrandfieldCount(key, count) {
|
|
667
|
-
return this.addAndReturn((0,
|
|
666
|
+
return this.addAndReturn((0, _1.createHRandField)(key, count));
|
|
668
667
|
}
|
|
669
668
|
/**
|
|
670
669
|
* Retrieves up to `count` random field names along with their values from the hash
|
|
@@ -683,7 +682,7 @@ class BaseBatch {
|
|
|
683
682
|
* If the hash does not exist or is empty, the response will be an empty `array`.
|
|
684
683
|
*/
|
|
685
684
|
hrandfieldWithValues(key, count) {
|
|
686
|
-
return this.addAndReturn((0,
|
|
685
|
+
return this.addAndReturn((0, _1.createHRandField)(key, count, true));
|
|
687
686
|
}
|
|
688
687
|
/** Inserts all the specified values at the head of the list stored at `key`.
|
|
689
688
|
* `elements` are inserted one after the other to the head of the list, from the leftmost element to the rightmost element.
|
|
@@ -696,7 +695,7 @@ class BaseBatch {
|
|
|
696
695
|
* Command Response - the length of the list after the push operations.
|
|
697
696
|
*/
|
|
698
697
|
lpush(key, elements) {
|
|
699
|
-
return this.addAndReturn((0,
|
|
698
|
+
return this.addAndReturn((0, _1.createLPush)(key, elements));
|
|
700
699
|
}
|
|
701
700
|
/**
|
|
702
701
|
* Inserts specified values at the head of the `list`, only if `key` already
|
|
@@ -710,7 +709,7 @@ class BaseBatch {
|
|
|
710
709
|
* Command Response - The length of the list after the push operation.
|
|
711
710
|
*/
|
|
712
711
|
lpushx(key, elements) {
|
|
713
|
-
return this.addAndReturn((0,
|
|
712
|
+
return this.addAndReturn((0, _1.createLPushX)(key, elements));
|
|
714
713
|
}
|
|
715
714
|
/** Removes and returns the first elements of the list stored at `key`.
|
|
716
715
|
* The command pops a single element from the beginning of the list.
|
|
@@ -722,7 +721,7 @@ class BaseBatch {
|
|
|
722
721
|
* If `key` does not exist null will be returned.
|
|
723
722
|
*/
|
|
724
723
|
lpop(key) {
|
|
725
|
-
return this.addAndReturn((0,
|
|
724
|
+
return this.addAndReturn((0, _1.createLPop)(key));
|
|
726
725
|
}
|
|
727
726
|
/** Removes and returns up to `count` elements of the list stored at `key`, depending on the list's length.
|
|
728
727
|
* @see {@link https://valkey.io/commands/lpop/|valkey.io} for details.
|
|
@@ -734,7 +733,7 @@ class BaseBatch {
|
|
|
734
733
|
* If `key` does not exist null will be returned.
|
|
735
734
|
*/
|
|
736
735
|
lpopCount(key, count) {
|
|
737
|
-
return this.addAndReturn((0,
|
|
736
|
+
return this.addAndReturn((0, _1.createLPop)(key, count));
|
|
738
737
|
}
|
|
739
738
|
/** Returns the specified elements of the list stored at `key`.
|
|
740
739
|
* The offsets `start` and `end` are zero-based indexes, with 0 being the first element of the list, 1 being the next element and so on.
|
|
@@ -752,7 +751,7 @@ class BaseBatch {
|
|
|
752
751
|
* If `key` does not exist an empty list will be returned.
|
|
753
752
|
*/
|
|
754
753
|
lrange(key, start, end) {
|
|
755
|
-
return this.addAndReturn((0,
|
|
754
|
+
return this.addAndReturn((0, _1.createLRange)(key, start, end));
|
|
756
755
|
}
|
|
757
756
|
/** Returns the length of the list stored at `key`.
|
|
758
757
|
* @see {@link https://valkey.io/commands/llen/|valkey.io} for details.
|
|
@@ -763,7 +762,7 @@ class BaseBatch {
|
|
|
763
762
|
* If `key` does not exist, it is interpreted as an empty list and 0 is returned.
|
|
764
763
|
*/
|
|
765
764
|
llen(key) {
|
|
766
|
-
return this.addAndReturn((0,
|
|
765
|
+
return this.addAndReturn((0, _1.createLLen)(key));
|
|
767
766
|
}
|
|
768
767
|
/**
|
|
769
768
|
* Atomically pops and removes the left/right-most element to the list stored at `source`
|
|
@@ -781,7 +780,7 @@ class BaseBatch {
|
|
|
781
780
|
* Command Response - The popped element, or `null` if `source` does not exist.
|
|
782
781
|
*/
|
|
783
782
|
lmove(source, destination, whereFrom, whereTo) {
|
|
784
|
-
return this.addAndReturn((0,
|
|
783
|
+
return this.addAndReturn((0, _1.createLMove)(source, destination, whereFrom, whereTo));
|
|
785
784
|
}
|
|
786
785
|
/**
|
|
787
786
|
*
|
|
@@ -804,7 +803,7 @@ class BaseBatch {
|
|
|
804
803
|
* Command Response - The popped element, or `null` if `source` does not exist or if the operation timed-out.
|
|
805
804
|
*/
|
|
806
805
|
blmove(source, destination, whereFrom, whereTo, timeout) {
|
|
807
|
-
return this.addAndReturn((0,
|
|
806
|
+
return this.addAndReturn((0, _1.createBLMove)(source, destination, whereFrom, whereTo, timeout));
|
|
808
807
|
}
|
|
809
808
|
/**
|
|
810
809
|
* Sets the list element at `index` to `element`.
|
|
@@ -821,7 +820,7 @@ class BaseBatch {
|
|
|
821
820
|
* Command Response - Always "OK".
|
|
822
821
|
*/
|
|
823
822
|
lset(key, index, element) {
|
|
824
|
-
return this.addAndReturn((0,
|
|
823
|
+
return this.addAndReturn((0, _1.createLSet)(key, index, element));
|
|
825
824
|
}
|
|
826
825
|
/** Trim an existing list so that it will contain only the specified range of elements specified.
|
|
827
826
|
* The offsets `start` and `end` are zero-based indexes, with 0 being the first element of the list, 1 being the next element and so on.
|
|
@@ -839,7 +838,7 @@ class BaseBatch {
|
|
|
839
838
|
* If `key` does not exist the command will be ignored.
|
|
840
839
|
*/
|
|
841
840
|
ltrim(key, start, end) {
|
|
842
|
-
return this.addAndReturn((0,
|
|
841
|
+
return this.addAndReturn((0, _1.createLTrim)(key, start, end));
|
|
843
842
|
}
|
|
844
843
|
/** Removes the first `count` occurrences of elements equal to `element` from the list stored at `key`.
|
|
845
844
|
* If `count` is positive : Removes elements equal to `element` moving from head to tail.
|
|
@@ -854,7 +853,7 @@ class BaseBatch {
|
|
|
854
853
|
* If `key` does not exist, 0 is returned.
|
|
855
854
|
*/
|
|
856
855
|
lrem(key, count, element) {
|
|
857
|
-
return this.addAndReturn((0,
|
|
856
|
+
return this.addAndReturn((0, _1.createLRem)(key, count, element));
|
|
858
857
|
}
|
|
859
858
|
/** Inserts all the specified values at the tail of the list stored at `key`.
|
|
860
859
|
* `elements` are inserted one after the other to the tail of the list, from the leftmost element to the rightmost element.
|
|
@@ -867,7 +866,7 @@ class BaseBatch {
|
|
|
867
866
|
* Command Response - the length of the list after the push operations.
|
|
868
867
|
*/
|
|
869
868
|
rpush(key, elements) {
|
|
870
|
-
return this.addAndReturn((0,
|
|
869
|
+
return this.addAndReturn((0, _1.createRPush)(key, elements));
|
|
871
870
|
}
|
|
872
871
|
/**
|
|
873
872
|
* Inserts specified values at the tail of the `list`, only if `key` already
|
|
@@ -881,7 +880,7 @@ class BaseBatch {
|
|
|
881
880
|
* Command Response - The length of the list after the push operation.
|
|
882
881
|
*/
|
|
883
882
|
rpushx(key, elements) {
|
|
884
|
-
return this.addAndReturn((0,
|
|
883
|
+
return this.addAndReturn((0, _1.createRPushX)(key, elements));
|
|
885
884
|
}
|
|
886
885
|
/** Removes and returns the last elements of the list stored at `key`.
|
|
887
886
|
* The command pops a single element from the end of the list.
|
|
@@ -893,7 +892,7 @@ class BaseBatch {
|
|
|
893
892
|
* If `key` does not exist null will be returned.
|
|
894
893
|
*/
|
|
895
894
|
rpop(key) {
|
|
896
|
-
return this.addAndReturn((0,
|
|
895
|
+
return this.addAndReturn((0, _1.createRPop)(key));
|
|
897
896
|
}
|
|
898
897
|
/** Removes and returns up to `count` elements from the list stored at `key`, depending on the list's length.
|
|
899
898
|
* @see {@link https://valkey.io/commands/rpop/|valkey.io} for details.
|
|
@@ -905,7 +904,7 @@ class BaseBatch {
|
|
|
905
904
|
* If `key` does not exist null will be returned.
|
|
906
905
|
*/
|
|
907
906
|
rpopCount(key, count) {
|
|
908
|
-
return this.addAndReturn((0,
|
|
907
|
+
return this.addAndReturn((0, _1.createRPop)(key, count));
|
|
909
908
|
}
|
|
910
909
|
/** Adds the specified members to the set stored at `key`. Specified members that are already a member of this set are ignored.
|
|
911
910
|
* If `key` does not exist, a new set is created before adding `members`.
|
|
@@ -917,7 +916,7 @@ class BaseBatch {
|
|
|
917
916
|
* Command Response - the number of members that were added to the set, not including all the members already present in the set.
|
|
918
917
|
*/
|
|
919
918
|
sadd(key, members) {
|
|
920
|
-
return this.addAndReturn((0,
|
|
919
|
+
return this.addAndReturn((0, _1.createSAdd)(key, members));
|
|
921
920
|
}
|
|
922
921
|
/** Removes the specified members from the set stored at `key`. Specified members that are not a member of this set are ignored.
|
|
923
922
|
* @see {@link https://valkey.io/commands/srem/|valkey.io} for details.
|
|
@@ -929,7 +928,7 @@ class BaseBatch {
|
|
|
929
928
|
* If `key` does not exist, it is treated as an empty set and this command returns 0.
|
|
930
929
|
*/
|
|
931
930
|
srem(key, members) {
|
|
932
|
-
return this.addAndReturn((0,
|
|
931
|
+
return this.addAndReturn((0, _1.createSRem)(key, members));
|
|
933
932
|
}
|
|
934
933
|
/**
|
|
935
934
|
* Iterates incrementally over a set.
|
|
@@ -944,7 +943,7 @@ class BaseBatch {
|
|
|
944
943
|
* The `cursor` will be `"0"` on the last iteration of the set. The second element is always an array of the subset of the set held in `key`.
|
|
945
944
|
*/
|
|
946
945
|
sscan(key, cursor, options) {
|
|
947
|
-
return this.addAndReturn((0,
|
|
946
|
+
return this.addAndReturn((0, _1.createSScan)(key, cursor, options));
|
|
948
947
|
}
|
|
949
948
|
/** Returns all the members of the set value stored at `key`.
|
|
950
949
|
* @see {@link https://valkey.io/commands/smembers/|valkey.io} for details.
|
|
@@ -955,7 +954,7 @@ class BaseBatch {
|
|
|
955
954
|
* If `key` does not exist, it is treated as an empty set and this command returns empty list.
|
|
956
955
|
*/
|
|
957
956
|
smembers(key) {
|
|
958
|
-
return this.addAndReturn((0,
|
|
957
|
+
return this.addAndReturn((0, _1.createSMembers)(key), true);
|
|
959
958
|
}
|
|
960
959
|
/** Moves `member` from the set at `source` to the set at `destination`, removing it from the source set.
|
|
961
960
|
* Creates a new destination set if needed. The operation is atomic.
|
|
@@ -968,7 +967,7 @@ class BaseBatch {
|
|
|
968
967
|
* Command Response - `true` on success, or `false` if the `source` set does not exist or the element is not a member of the source set.
|
|
969
968
|
*/
|
|
970
969
|
smove(source, destination, member) {
|
|
971
|
-
return this.addAndReturn((0,
|
|
970
|
+
return this.addAndReturn((0, _1.createSMove)(source, destination, member));
|
|
972
971
|
}
|
|
973
972
|
/** Returns the set cardinality (number of elements) of the set stored at `key`.
|
|
974
973
|
* @see {@link https://valkey.io/commands/scard/|valkey.io} for details.
|
|
@@ -978,7 +977,7 @@ class BaseBatch {
|
|
|
978
977
|
* Command Response - the cardinality (number of elements) of the set, or 0 if key does not exist.
|
|
979
978
|
*/
|
|
980
979
|
scard(key) {
|
|
981
|
-
return this.addAndReturn((0,
|
|
980
|
+
return this.addAndReturn((0, _1.createSCard)(key));
|
|
982
981
|
}
|
|
983
982
|
/** Gets the intersection of all the given sets.
|
|
984
983
|
* When in cluster mode, all `keys` must map to the same hash slot.
|
|
@@ -990,7 +989,7 @@ class BaseBatch {
|
|
|
990
989
|
* If one or more sets do not exist, an empty set will be returned.
|
|
991
990
|
*/
|
|
992
991
|
sinter(keys) {
|
|
993
|
-
return this.addAndReturn((0,
|
|
992
|
+
return this.addAndReturn((0, _1.createSInter)(keys), true);
|
|
994
993
|
}
|
|
995
994
|
/**
|
|
996
995
|
* Gets the cardinality of the intersection of all the given sets.
|
|
@@ -1005,7 +1004,7 @@ class BaseBatch {
|
|
|
1005
1004
|
* Command Response - The cardinality of the intersection result. If one or more sets do not exist, `0` is returned.
|
|
1006
1005
|
*/
|
|
1007
1006
|
sintercard(keys, options) {
|
|
1008
|
-
return this.addAndReturn((0,
|
|
1007
|
+
return this.addAndReturn((0, _1.createSInterCard)(keys, options?.limit));
|
|
1009
1008
|
}
|
|
1010
1009
|
/**
|
|
1011
1010
|
* Stores the members of the intersection of all given sets specified by `keys` into a new set at `destination`.
|
|
@@ -1018,7 +1017,7 @@ class BaseBatch {
|
|
|
1018
1017
|
* Command Response - The number of elements in the resulting set.
|
|
1019
1018
|
*/
|
|
1020
1019
|
sinterstore(destination, keys) {
|
|
1021
|
-
return this.addAndReturn((0,
|
|
1020
|
+
return this.addAndReturn((0, _1.createSInterStore)(destination, keys));
|
|
1022
1021
|
}
|
|
1023
1022
|
/**
|
|
1024
1023
|
* Computes the difference between the first set and all the successive sets in `keys`.
|
|
@@ -1031,7 +1030,7 @@ class BaseBatch {
|
|
|
1031
1030
|
* If a key in `keys` does not exist, it is treated as an empty set.
|
|
1032
1031
|
*/
|
|
1033
1032
|
sdiff(keys) {
|
|
1034
|
-
return this.addAndReturn((0,
|
|
1033
|
+
return this.addAndReturn((0, _1.createSDiff)(keys), true);
|
|
1035
1034
|
}
|
|
1036
1035
|
/**
|
|
1037
1036
|
* Stores the difference between the first set and all the successive sets in `keys` into a new set at `destination`.
|
|
@@ -1044,7 +1043,7 @@ class BaseBatch {
|
|
|
1044
1043
|
* Command Response - The number of elements in the resulting set.
|
|
1045
1044
|
*/
|
|
1046
1045
|
sdiffstore(destination, keys) {
|
|
1047
|
-
return this.addAndReturn((0,
|
|
1046
|
+
return this.addAndReturn((0, _1.createSDiffStore)(destination, keys));
|
|
1048
1047
|
}
|
|
1049
1048
|
/**
|
|
1050
1049
|
* Gets the union of all the given sets.
|
|
@@ -1057,7 +1056,7 @@ class BaseBatch {
|
|
|
1057
1056
|
* If none of the sets exist, an empty `Set` will be returned.
|
|
1058
1057
|
*/
|
|
1059
1058
|
sunion(keys) {
|
|
1060
|
-
return this.addAndReturn((0,
|
|
1059
|
+
return this.addAndReturn((0, _1.createSUnion)(keys), true);
|
|
1061
1060
|
}
|
|
1062
1061
|
/**
|
|
1063
1062
|
* Stores the members of the union of all given sets specified by `keys` into a new set
|
|
@@ -1071,7 +1070,7 @@ class BaseBatch {
|
|
|
1071
1070
|
* Command Response - The number of elements in the resulting set.
|
|
1072
1071
|
*/
|
|
1073
1072
|
sunionstore(destination, keys) {
|
|
1074
|
-
return this.addAndReturn((0,
|
|
1073
|
+
return this.addAndReturn((0, _1.createSUnionStore)(destination, keys));
|
|
1075
1074
|
}
|
|
1076
1075
|
/** Returns if `member` is a member of the set stored at `key`.
|
|
1077
1076
|
* @see {@link https://valkey.io/commands/sismember/|valkey.io} for details.
|
|
@@ -1083,7 +1082,7 @@ class BaseBatch {
|
|
|
1083
1082
|
* If `key` doesn't exist, it is treated as an empty set and the command returns `false`.
|
|
1084
1083
|
*/
|
|
1085
1084
|
sismember(key, member) {
|
|
1086
|
-
return this.addAndReturn((0,
|
|
1085
|
+
return this.addAndReturn((0, _1.createSIsMember)(key, member));
|
|
1087
1086
|
}
|
|
1088
1087
|
/**
|
|
1089
1088
|
* Checks whether each member is contained in the members of the set stored at `key`.
|
|
@@ -1097,7 +1096,7 @@ class BaseBatch {
|
|
|
1097
1096
|
* Command Response - An `array` of `boolean` values, each indicating if the respective member exists in the set.
|
|
1098
1097
|
*/
|
|
1099
1098
|
smismember(key, members) {
|
|
1100
|
-
return this.addAndReturn((0,
|
|
1099
|
+
return this.addAndReturn((0, _1.createSMIsMember)(key, members));
|
|
1101
1100
|
}
|
|
1102
1101
|
/** Removes and returns one random member from the set value store at `key`.
|
|
1103
1102
|
* @see {@link https://valkey.io/commands/spop/|valkey.io} for details.
|
|
@@ -1109,7 +1108,7 @@ class BaseBatch {
|
|
|
1109
1108
|
* If `key` does not exist, null will be returned.
|
|
1110
1109
|
*/
|
|
1111
1110
|
spop(key) {
|
|
1112
|
-
return this.addAndReturn((0,
|
|
1111
|
+
return this.addAndReturn((0, _1.createSPop)(key));
|
|
1113
1112
|
}
|
|
1114
1113
|
/** Removes and returns up to `count` random members from the set value store at `key`, depending on the set's length.
|
|
1115
1114
|
* @see {@link https://valkey.io/commands/spop/|valkey.io} for details.
|
|
@@ -1121,7 +1120,7 @@ class BaseBatch {
|
|
|
1121
1120
|
* If `key` does not exist, empty list will be returned.
|
|
1122
1121
|
*/
|
|
1123
1122
|
spopCount(key, count) {
|
|
1124
|
-
return this.addAndReturn((0,
|
|
1123
|
+
return this.addAndReturn((0, _1.createSPop)(key, count), true);
|
|
1125
1124
|
}
|
|
1126
1125
|
/** Returns a random element from the set value stored at `key`.
|
|
1127
1126
|
*
|
|
@@ -1131,7 +1130,7 @@ class BaseBatch {
|
|
|
1131
1130
|
* Command Response - A random element from the set, or null if `key` does not exist.
|
|
1132
1131
|
*/
|
|
1133
1132
|
srandmember(key) {
|
|
1134
|
-
return this.addAndReturn((0,
|
|
1133
|
+
return this.addAndReturn((0, _1.createSRandMember)(key));
|
|
1135
1134
|
}
|
|
1136
1135
|
/** Returns one or more random elements from the set value stored at `key`.
|
|
1137
1136
|
*
|
|
@@ -1144,7 +1143,7 @@ class BaseBatch {
|
|
|
1144
1143
|
* Command Response - A list of members from the set. If the set does not exist or is empty, an empty list will be returned.
|
|
1145
1144
|
*/
|
|
1146
1145
|
srandmemberCount(key, count) {
|
|
1147
|
-
return this.addAndReturn((0,
|
|
1146
|
+
return this.addAndReturn((0, _1.createSRandMember)(key, count));
|
|
1148
1147
|
}
|
|
1149
1148
|
/**
|
|
1150
1149
|
* Returns the number of keys in `keys` that exist in the database.
|
|
@@ -1157,7 +1156,7 @@ class BaseBatch {
|
|
|
1157
1156
|
* it will be counted multiple times.
|
|
1158
1157
|
*/
|
|
1159
1158
|
exists(keys) {
|
|
1160
|
-
return this.addAndReturn((0,
|
|
1159
|
+
return this.addAndReturn((0, _1.createExists)(keys));
|
|
1161
1160
|
}
|
|
1162
1161
|
/**
|
|
1163
1162
|
* Removes the specified keys. A key is ignored if it does not exist.
|
|
@@ -1171,7 +1170,7 @@ class BaseBatch {
|
|
|
1171
1170
|
* Command Response - The number of keys that were unlinked.
|
|
1172
1171
|
*/
|
|
1173
1172
|
unlink(keys) {
|
|
1174
|
-
return this.addAndReturn((0,
|
|
1173
|
+
return this.addAndReturn((0, _1.createUnlink)(keys));
|
|
1175
1174
|
}
|
|
1176
1175
|
/**
|
|
1177
1176
|
* Sets a timeout on `key` in seconds. After the timeout has expired, the key will automatically be deleted.
|
|
@@ -1190,7 +1189,7 @@ class BaseBatch {
|
|
|
1190
1189
|
* or operation skipped due to the provided arguments.
|
|
1191
1190
|
*/
|
|
1192
1191
|
expire(key, seconds, options) {
|
|
1193
|
-
return this.addAndReturn((0,
|
|
1192
|
+
return this.addAndReturn((0, _1.createExpire)(key, seconds, options?.expireOption));
|
|
1194
1193
|
}
|
|
1195
1194
|
/**
|
|
1196
1195
|
* Sets a timeout on `key`. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds.
|
|
@@ -1209,7 +1208,7 @@ class BaseBatch {
|
|
|
1209
1208
|
* or operation skipped due to the provided arguments.
|
|
1210
1209
|
*/
|
|
1211
1210
|
expireAt(key, unixSeconds, options) {
|
|
1212
|
-
return this.addAndReturn((0,
|
|
1211
|
+
return this.addAndReturn((0, _1.createExpireAt)(key, unixSeconds, options?.expireOption));
|
|
1213
1212
|
}
|
|
1214
1213
|
/**
|
|
1215
1214
|
* Returns the absolute Unix timestamp (since January 1, 1970) at which the given `key` will expire, in seconds.
|
|
@@ -1223,7 +1222,7 @@ class BaseBatch {
|
|
|
1223
1222
|
* Command Response - The expiration Unix timestamp in seconds, `-2` if `key` does not exist or `-1` if `key` exists but has no associated expire.
|
|
1224
1223
|
*/
|
|
1225
1224
|
expireTime(key) {
|
|
1226
|
-
return this.addAndReturn((0,
|
|
1225
|
+
return this.addAndReturn((0, _1.createExpireTime)(key));
|
|
1227
1226
|
}
|
|
1228
1227
|
/**
|
|
1229
1228
|
* Sets a timeout on `key` in milliseconds. After the timeout has expired, the key will automatically be deleted.
|
|
@@ -1242,7 +1241,7 @@ class BaseBatch {
|
|
|
1242
1241
|
* or operation skipped due to the provided arguments.
|
|
1243
1242
|
*/
|
|
1244
1243
|
pexpire(key, milliseconds, options) {
|
|
1245
|
-
return this.addAndReturn((0,
|
|
1244
|
+
return this.addAndReturn((0, _1.createPExpire)(key, milliseconds, options?.expireOption));
|
|
1246
1245
|
}
|
|
1247
1246
|
/**
|
|
1248
1247
|
* Sets a timeout on `key`. It takes an absolute Unix timestamp (milliseconds since January 1, 1970) instead of specifying the number of milliseconds.
|
|
@@ -1261,7 +1260,7 @@ class BaseBatch {
|
|
|
1261
1260
|
* or operation skipped due to the provided arguments.
|
|
1262
1261
|
*/
|
|
1263
1262
|
pexpireAt(key, unixMilliseconds, options) {
|
|
1264
|
-
return this.addAndReturn((0,
|
|
1263
|
+
return this.addAndReturn((0, _1.createPExpireAt)(key, unixMilliseconds, options?.expireOption));
|
|
1265
1264
|
}
|
|
1266
1265
|
/**
|
|
1267
1266
|
* Returns the absolute Unix timestamp (since January 1, 1970) at which the given `key` will expire, in milliseconds.
|
|
@@ -1274,7 +1273,7 @@ class BaseBatch {
|
|
|
1274
1273
|
* Command Response - The expiration Unix timestamp in seconds, `-2` if `key` does not exist or `-1` if `key` exists but has no associated expire.
|
|
1275
1274
|
*/
|
|
1276
1275
|
pexpireTime(key) {
|
|
1277
|
-
return this.addAndReturn((0,
|
|
1276
|
+
return this.addAndReturn((0, _1.createPExpireTime)(key));
|
|
1278
1277
|
}
|
|
1279
1278
|
/**
|
|
1280
1279
|
* Returns the remaining time to live of `key` that has a timeout.
|
|
@@ -1286,7 +1285,7 @@ class BaseBatch {
|
|
|
1286
1285
|
* Command Response - TTL in seconds, `-2` if `key` does not exist or `-1` if `key` exists but has no associated expire.
|
|
1287
1286
|
*/
|
|
1288
1287
|
ttl(key) {
|
|
1289
|
-
return this.addAndReturn((0,
|
|
1288
|
+
return this.addAndReturn((0, _1.createTTL)(key));
|
|
1290
1289
|
}
|
|
1291
1290
|
/**
|
|
1292
1291
|
* Adds members with their scores to the sorted set stored at `key`.
|
|
@@ -1302,7 +1301,7 @@ class BaseBatch {
|
|
|
1302
1301
|
* If {@link ZAddOptions.changed} is set to `true`, returns the number of elements updated in the sorted set.
|
|
1303
1302
|
*/
|
|
1304
1303
|
zadd(key, membersAndScores, options) {
|
|
1305
|
-
return this.addAndReturn((0,
|
|
1304
|
+
return this.addAndReturn((0, _1.createZAdd)(key, membersAndScores, options));
|
|
1306
1305
|
}
|
|
1307
1306
|
/**
|
|
1308
1307
|
* Increments the score of member in the sorted set stored at `key` by `increment`.
|
|
@@ -1320,7 +1319,7 @@ class BaseBatch {
|
|
|
1320
1319
|
* If there was a conflict with the options, the operation aborts and `null` is returned.
|
|
1321
1320
|
*/
|
|
1322
1321
|
zaddIncr(key, member, increment, options) {
|
|
1323
|
-
return this.addAndReturn((0,
|
|
1322
|
+
return this.addAndReturn((0, _1.createZAdd)(key, [{ element: member, score: increment }], options, true));
|
|
1324
1323
|
}
|
|
1325
1324
|
/**
|
|
1326
1325
|
* Removes the specified members from the sorted set stored at `key`.
|
|
@@ -1335,7 +1334,7 @@ class BaseBatch {
|
|
|
1335
1334
|
* If `key` does not exist, it is treated as an empty sorted set, and this command returns 0.
|
|
1336
1335
|
*/
|
|
1337
1336
|
zrem(key, members) {
|
|
1338
|
-
return this.addAndReturn((0,
|
|
1337
|
+
return this.addAndReturn((0, _1.createZRem)(key, members));
|
|
1339
1338
|
}
|
|
1340
1339
|
/**
|
|
1341
1340
|
* Returns the cardinality (number of elements) of the sorted set stored at `key`.
|
|
@@ -1348,7 +1347,7 @@ class BaseBatch {
|
|
|
1348
1347
|
* If `key` does not exist, it is treated as an empty sorted set, and this command returns `0`.
|
|
1349
1348
|
*/
|
|
1350
1349
|
zcard(key) {
|
|
1351
|
-
return this.addAndReturn((0,
|
|
1350
|
+
return this.addAndReturn((0, _1.createZCard)(key));
|
|
1352
1351
|
}
|
|
1353
1352
|
/**
|
|
1354
1353
|
* Returns the cardinality of the intersection of the sorted sets specified by `keys`.
|
|
@@ -1363,7 +1362,7 @@ class BaseBatch {
|
|
|
1363
1362
|
* Command Response - The cardinality of the intersection of the given sorted sets.
|
|
1364
1363
|
*/
|
|
1365
1364
|
zintercard(keys, options) {
|
|
1366
|
-
return this.addAndReturn((0,
|
|
1365
|
+
return this.addAndReturn((0, _1.createZInterCard)(keys, options?.limit));
|
|
1367
1366
|
}
|
|
1368
1367
|
/**
|
|
1369
1368
|
* Returns the difference between the first sorted set and all the successive sorted sets.
|
|
@@ -1378,7 +1377,7 @@ class BaseBatch {
|
|
|
1378
1377
|
* If the first key does not exist, it is treated as an empty sorted set, and the command returns an empty `array`.
|
|
1379
1378
|
*/
|
|
1380
1379
|
zdiff(keys) {
|
|
1381
|
-
return this.addAndReturn((0,
|
|
1380
|
+
return this.addAndReturn((0, _1.createZDiff)(keys));
|
|
1382
1381
|
}
|
|
1383
1382
|
/**
|
|
1384
1383
|
* Returns the difference between the first sorted set and all the successive sorted sets, with the associated
|
|
@@ -1394,7 +1393,7 @@ class BaseBatch {
|
|
|
1394
1393
|
* The response comes in format `GlideRecord<number>`, see {@link GlideRecord}.
|
|
1395
1394
|
*/
|
|
1396
1395
|
zdiffWithScores(keys) {
|
|
1397
|
-
return this.addAndReturn((0,
|
|
1396
|
+
return this.addAndReturn((0, _1.createZDiffWithScores)(keys));
|
|
1398
1397
|
}
|
|
1399
1398
|
/**
|
|
1400
1399
|
* Calculates the difference between the first sorted set and all the successive sorted sets in `keys` and stores
|
|
@@ -1410,7 +1409,7 @@ class BaseBatch {
|
|
|
1410
1409
|
* Command Response - The number of members in the resulting sorted set stored at `destination`.
|
|
1411
1410
|
*/
|
|
1412
1411
|
zdiffstore(destination, keys) {
|
|
1413
|
-
return this.addAndReturn((0,
|
|
1412
|
+
return this.addAndReturn((0, _1.createZDiffStore)(destination, keys));
|
|
1414
1413
|
}
|
|
1415
1414
|
/**
|
|
1416
1415
|
* Returns the score of `member` in the sorted set stored at `key`.
|
|
@@ -1425,7 +1424,7 @@ class BaseBatch {
|
|
|
1425
1424
|
* If `key` does not exist, null is returned.
|
|
1426
1425
|
*/
|
|
1427
1426
|
zscore(key, member) {
|
|
1428
|
-
return this.addAndReturn((0,
|
|
1427
|
+
return this.addAndReturn((0, _1.createZScore)(key, member));
|
|
1429
1428
|
}
|
|
1430
1429
|
/**
|
|
1431
1430
|
* Computes the union of sorted sets given by the specified `keys` and stores the result in `destination`.
|
|
@@ -1444,7 +1443,7 @@ class BaseBatch {
|
|
|
1444
1443
|
* Command Response - The number of elements in the resulting sorted set stored at `destination`.
|
|
1445
1444
|
*/
|
|
1446
1445
|
zunionstore(destination, keys, options) {
|
|
1447
|
-
return this.addAndReturn((0,
|
|
1446
|
+
return this.addAndReturn((0, _1.createZUnionStore)(destination, keys, options?.aggregationType));
|
|
1448
1447
|
}
|
|
1449
1448
|
/**
|
|
1450
1449
|
* Returns the scores associated with the specified `members` in the sorted set stored at `key`.
|
|
@@ -1459,7 +1458,7 @@ class BaseBatch {
|
|
|
1459
1458
|
* If a member does not exist in the sorted set, the corresponding value in the list will be `null`.
|
|
1460
1459
|
*/
|
|
1461
1460
|
zmscore(key, members) {
|
|
1462
|
-
return this.addAndReturn((0,
|
|
1461
|
+
return this.addAndReturn((0, _1.createZMScore)(key, members));
|
|
1463
1462
|
}
|
|
1464
1463
|
/**
|
|
1465
1464
|
* Returns the number of members in the sorted set stored at `key` with scores between `minScore` and `maxScore`.
|
|
@@ -1475,7 +1474,7 @@ class BaseBatch {
|
|
|
1475
1474
|
* If `minScore` is greater than `maxScore`, `0` is returned.
|
|
1476
1475
|
*/
|
|
1477
1476
|
zcount(key, minScore, maxScore) {
|
|
1478
|
-
return this.addAndReturn((0,
|
|
1477
|
+
return this.addAndReturn((0, _1.createZCount)(key, minScore, maxScore));
|
|
1479
1478
|
}
|
|
1480
1479
|
/**
|
|
1481
1480
|
* Returns the specified range of elements in the sorted set stored at `key`.
|
|
@@ -1496,7 +1495,7 @@ class BaseBatch {
|
|
|
1496
1495
|
* If `key` does not exist, it is treated as an empty sorted set, and the command returns an empty array.
|
|
1497
1496
|
*/
|
|
1498
1497
|
zrange(key, rangeQuery, reverse = false) {
|
|
1499
|
-
return this.addAndReturn((0,
|
|
1498
|
+
return this.addAndReturn((0, _1.createZRange)(key, rangeQuery, reverse));
|
|
1500
1499
|
}
|
|
1501
1500
|
/**
|
|
1502
1501
|
* Returns the specified range of elements with their scores in the sorted set stored at `key`.
|
|
@@ -1515,7 +1514,7 @@ class BaseBatch {
|
|
|
1515
1514
|
* The response comes in format `GlideRecord<number>`, see {@link GlideRecord}.
|
|
1516
1515
|
*/
|
|
1517
1516
|
zrangeWithScores(key, rangeQuery, reverse = false) {
|
|
1518
|
-
return this.addAndReturn((0,
|
|
1517
|
+
return this.addAndReturn((0, _1.createZRangeWithScores)(key, rangeQuery, reverse));
|
|
1519
1518
|
}
|
|
1520
1519
|
/**
|
|
1521
1520
|
* Stores a specified range of elements from the sorted set at `source`, into a new
|
|
@@ -1536,7 +1535,7 @@ class BaseBatch {
|
|
|
1536
1535
|
* Command Response - The number of elements in the resulting sorted set.
|
|
1537
1536
|
*/
|
|
1538
1537
|
zrangeStore(destination, source, rangeQuery, reverse = false) {
|
|
1539
|
-
return this.addAndReturn((0,
|
|
1538
|
+
return this.addAndReturn((0, _1.createZRangeStore)(destination, source, rangeQuery, reverse));
|
|
1540
1539
|
}
|
|
1541
1540
|
/**
|
|
1542
1541
|
* Computes the intersection of sorted sets given by the specified `keys` and stores the result in `destination`.
|
|
@@ -1557,7 +1556,7 @@ class BaseBatch {
|
|
|
1557
1556
|
* Command Response - The number of elements in the resulting sorted set stored at `destination`.
|
|
1558
1557
|
*/
|
|
1559
1558
|
zinterstore(destination, keys, options) {
|
|
1560
|
-
return this.addAndReturn((0,
|
|
1559
|
+
return this.addAndReturn((0, _1.createZInterstore)(destination, keys, options?.aggregationType));
|
|
1561
1560
|
}
|
|
1562
1561
|
/**
|
|
1563
1562
|
* Computes the intersection of sorted sets given by the specified `keys` and returns a list of intersecting elements.
|
|
@@ -1573,7 +1572,7 @@ class BaseBatch {
|
|
|
1573
1572
|
* Command Response - The resulting array of intersecting elements.
|
|
1574
1573
|
*/
|
|
1575
1574
|
zinter(keys) {
|
|
1576
|
-
return this.addAndReturn((0,
|
|
1575
|
+
return this.addAndReturn((0, _1.createZInter)(keys));
|
|
1577
1576
|
}
|
|
1578
1577
|
/**
|
|
1579
1578
|
* Computes the intersection of sorted sets given by the specified `keys` and returns a list of intersecting elements with scores.
|
|
@@ -1596,7 +1595,7 @@ class BaseBatch {
|
|
|
1596
1595
|
* The response comes in format `GlideRecord<number>`, see {@link GlideRecord}.
|
|
1597
1596
|
*/
|
|
1598
1597
|
zinterWithScores(keys, options) {
|
|
1599
|
-
return this.addAndReturn((0,
|
|
1598
|
+
return this.addAndReturn((0, _1.createZInter)(keys, options?.aggregationType, true));
|
|
1600
1599
|
}
|
|
1601
1600
|
/**
|
|
1602
1601
|
* Computes the union of sorted sets given by the specified `keys` and returns a list of union elements.
|
|
@@ -1612,7 +1611,7 @@ class BaseBatch {
|
|
|
1612
1611
|
* Command Response - The resulting array with a union of sorted set elements.
|
|
1613
1612
|
*/
|
|
1614
1613
|
zunion(keys) {
|
|
1615
|
-
return this.addAndReturn((0,
|
|
1614
|
+
return this.addAndReturn((0, _1.createZUnion)(keys));
|
|
1616
1615
|
}
|
|
1617
1616
|
/**
|
|
1618
1617
|
* Computes the intersection of sorted sets given by the specified `keys` and returns a list of union elements with scores.
|
|
@@ -1633,7 +1632,7 @@ class BaseBatch {
|
|
|
1633
1632
|
* The response comes in format `GlideRecord<number>`, see {@link GlideRecord}.
|
|
1634
1633
|
*/
|
|
1635
1634
|
zunionWithScores(keys, options) {
|
|
1636
|
-
return this.addAndReturn((0,
|
|
1635
|
+
return this.addAndReturn((0, _1.createZUnion)(keys, options?.aggregationType, true));
|
|
1637
1636
|
}
|
|
1638
1637
|
/**
|
|
1639
1638
|
* Returns a random member from the sorted set stored at `key`.
|
|
@@ -1646,7 +1645,7 @@ class BaseBatch {
|
|
|
1646
1645
|
* If the sorted set does not exist or is empty, the response will be `null`.
|
|
1647
1646
|
*/
|
|
1648
1647
|
zrandmember(key) {
|
|
1649
|
-
return this.addAndReturn((0,
|
|
1648
|
+
return this.addAndReturn((0, _1.createZRandMember)(key));
|
|
1650
1649
|
}
|
|
1651
1650
|
/**
|
|
1652
1651
|
* Returns random members from the sorted set stored at `key`.
|
|
@@ -1662,7 +1661,7 @@ class BaseBatch {
|
|
|
1662
1661
|
* If the sorted set does not exist or is empty, the response will be an empty `array`.
|
|
1663
1662
|
*/
|
|
1664
1663
|
zrandmemberWithCount(key, count) {
|
|
1665
|
-
return this.addAndReturn((0,
|
|
1664
|
+
return this.addAndReturn((0, _1.createZRandMember)(key, count));
|
|
1666
1665
|
}
|
|
1667
1666
|
/**
|
|
1668
1667
|
* Returns random members with scores from the sorted set stored at `key`.
|
|
@@ -1678,7 +1677,7 @@ class BaseBatch {
|
|
|
1678
1677
|
* If the sorted set does not exist or is empty, the response will be an empty `array`.
|
|
1679
1678
|
*/
|
|
1680
1679
|
zrandmemberWithCountWithScores(key, count) {
|
|
1681
|
-
return this.addAndReturn((0,
|
|
1680
|
+
return this.addAndReturn((0, _1.createZRandMember)(key, count, true));
|
|
1682
1681
|
}
|
|
1683
1682
|
/**
|
|
1684
1683
|
* Returns the string representation of the type of the value stored at `key`.
|
|
@@ -1690,7 +1689,7 @@ class BaseBatch {
|
|
|
1690
1689
|
* Command Response - If the key exists, the type of the stored value is returned. Otherwise, a "none" string is returned.
|
|
1691
1690
|
*/
|
|
1692
1691
|
type(key) {
|
|
1693
|
-
return this.addAndReturn((0,
|
|
1692
|
+
return this.addAndReturn((0, _1.createType)(key));
|
|
1694
1693
|
}
|
|
1695
1694
|
/**
|
|
1696
1695
|
* Returns the length of the string value stored at `key`.
|
|
@@ -1703,7 +1702,7 @@ class BaseBatch {
|
|
|
1703
1702
|
* If `key` does not exist, it is treated as an empty string, and the command returns `0`.
|
|
1704
1703
|
*/
|
|
1705
1704
|
strlen(key) {
|
|
1706
|
-
return this.addAndReturn((0,
|
|
1705
|
+
return this.addAndReturn((0, _1.createStrlen)(key));
|
|
1707
1706
|
}
|
|
1708
1707
|
/**
|
|
1709
1708
|
* Removes and returns the members with the lowest scores from the sorted set stored at `key`.
|
|
@@ -1721,7 +1720,7 @@ class BaseBatch {
|
|
|
1721
1720
|
* The response comes in format `GlideRecord<number>`, see {@link GlideRecord}.
|
|
1722
1721
|
*/
|
|
1723
1722
|
zpopmin(key, count) {
|
|
1724
|
-
return this.addAndReturn((0,
|
|
1723
|
+
return this.addAndReturn((0, _1.createZPopMin)(key, count));
|
|
1725
1724
|
}
|
|
1726
1725
|
/**
|
|
1727
1726
|
* Blocks the connection until it removes and returns a member with the lowest score from the
|
|
@@ -1739,7 +1738,7 @@ class BaseBatch {
|
|
|
1739
1738
|
* If no member could be popped and the `timeout` expired, returns `null`.
|
|
1740
1739
|
*/
|
|
1741
1740
|
bzpopmin(keys, timeout) {
|
|
1742
|
-
return this.addAndReturn((0,
|
|
1741
|
+
return this.addAndReturn((0, _1.createBZPopMin)(keys, timeout));
|
|
1743
1742
|
}
|
|
1744
1743
|
/**
|
|
1745
1744
|
* Removes and returns the members with the highest scores from the sorted set stored at `key`.
|
|
@@ -1757,7 +1756,7 @@ class BaseBatch {
|
|
|
1757
1756
|
* The response comes in format `GlideRecord<number>`, see {@link GlideRecord}.
|
|
1758
1757
|
*/
|
|
1759
1758
|
zpopmax(key, count) {
|
|
1760
|
-
return this.addAndReturn((0,
|
|
1759
|
+
return this.addAndReturn((0, _1.createZPopMax)(key, count));
|
|
1761
1760
|
}
|
|
1762
1761
|
/**
|
|
1763
1762
|
* Blocks the connection until it removes and returns a member with the highest score from the
|
|
@@ -1775,7 +1774,7 @@ class BaseBatch {
|
|
|
1775
1774
|
* If no member could be popped and the `timeout` expired, returns `null`.
|
|
1776
1775
|
*/
|
|
1777
1776
|
bzpopmax(keys, timeout) {
|
|
1778
|
-
return this.addAndReturn((0,
|
|
1777
|
+
return this.addAndReturn((0, _1.createBZPopMax)(keys, timeout));
|
|
1779
1778
|
}
|
|
1780
1779
|
/**
|
|
1781
1780
|
* Echoes the provided `message` back
|
|
@@ -1787,7 +1786,7 @@ class BaseBatch {
|
|
|
1787
1786
|
* Command Response - The provided `message`.
|
|
1788
1787
|
*/
|
|
1789
1788
|
echo(message) {
|
|
1790
|
-
return this.addAndReturn((0,
|
|
1789
|
+
return this.addAndReturn((0, _1.createEcho)(message));
|
|
1791
1790
|
}
|
|
1792
1791
|
/**
|
|
1793
1792
|
* Returns the remaining time to live of `key` that has a timeout, in milliseconds.
|
|
@@ -1799,7 +1798,7 @@ class BaseBatch {
|
|
|
1799
1798
|
* Command Response - TTL in milliseconds, `-2` if `key` does not exist, `-1` if `key` exists but has no associated expire.
|
|
1800
1799
|
*/
|
|
1801
1800
|
pttl(key) {
|
|
1802
|
-
return this.addAndReturn((0,
|
|
1801
|
+
return this.addAndReturn((0, _1.createPTTL)(key));
|
|
1803
1802
|
}
|
|
1804
1803
|
/**
|
|
1805
1804
|
* Removes all elements in the sorted set stored at `key` with rank between `start` and `end`.
|
|
@@ -1818,7 +1817,7 @@ class BaseBatch {
|
|
|
1818
1817
|
* If `key` does not exist 0 will be returned.
|
|
1819
1818
|
*/
|
|
1820
1819
|
zremRangeByRank(key, start, end) {
|
|
1821
|
-
return this.addAndReturn((0,
|
|
1820
|
+
return this.addAndReturn((0, _1.createZRemRangeByRank)(key, start, end));
|
|
1822
1821
|
}
|
|
1823
1822
|
/**
|
|
1824
1823
|
* Removes all elements in the sorted set stored at `key` with lexicographical order between `minLex` and `maxLex`.
|
|
@@ -1834,7 +1833,7 @@ class BaseBatch {
|
|
|
1834
1833
|
* If `minLex` is greater than `maxLex`, 0 is returned.
|
|
1835
1834
|
*/
|
|
1836
1835
|
zremRangeByLex(key, minLex, maxLex) {
|
|
1837
|
-
return this.addAndReturn((0,
|
|
1836
|
+
return this.addAndReturn((0, _1.createZRemRangeByLex)(key, minLex, maxLex));
|
|
1838
1837
|
}
|
|
1839
1838
|
/**
|
|
1840
1839
|
* Removes all elements in the sorted set stored at `key` with a score between `minScore` and `maxScore`.
|
|
@@ -1850,7 +1849,7 @@ class BaseBatch {
|
|
|
1850
1849
|
* If `minScore` is greater than `maxScore`, 0 is returned.
|
|
1851
1850
|
*/
|
|
1852
1851
|
zremRangeByScore(key, minScore, maxScore) {
|
|
1853
|
-
return this.addAndReturn((0,
|
|
1852
|
+
return this.addAndReturn((0, _1.createZRemRangeByScore)(key, minScore, maxScore));
|
|
1854
1853
|
}
|
|
1855
1854
|
/**
|
|
1856
1855
|
* Returns the number of members in the sorted set stored at 'key' with scores between 'minLex' and 'maxLex'.
|
|
@@ -1866,7 +1865,7 @@ class BaseBatch {
|
|
|
1866
1865
|
* If maxLex is less than minLex, '0' is returned.
|
|
1867
1866
|
*/
|
|
1868
1867
|
zlexcount(key, minLex, maxLex) {
|
|
1869
|
-
return this.addAndReturn((0,
|
|
1868
|
+
return this.addAndReturn((0, _1.createZLexCount)(key, minLex, maxLex));
|
|
1870
1869
|
}
|
|
1871
1870
|
/**
|
|
1872
1871
|
* Returns the rank of `member` in the sorted set stored at `key`, with scores ordered from low to high.
|
|
@@ -1881,7 +1880,7 @@ class BaseBatch {
|
|
|
1881
1880
|
* If `key` doesn't exist, or if `member` is not present in the set, null will be returned.
|
|
1882
1881
|
*/
|
|
1883
1882
|
zrank(key, member) {
|
|
1884
|
-
return this.addAndReturn((0,
|
|
1883
|
+
return this.addAndReturn((0, _1.createZRank)(key, member));
|
|
1885
1884
|
}
|
|
1886
1885
|
/**
|
|
1887
1886
|
* Returns the rank of `member` in the sorted set stored at `key` with its score, where scores are ordered from the lowest to highest.
|
|
@@ -1896,7 +1895,7 @@ class BaseBatch {
|
|
|
1896
1895
|
* If `key` doesn't exist, or if `member` is not present in the set, null will be returned.
|
|
1897
1896
|
*/
|
|
1898
1897
|
zrankWithScore(key, member) {
|
|
1899
|
-
return this.addAndReturn((0,
|
|
1898
|
+
return this.addAndReturn((0, _1.createZRank)(key, member, true));
|
|
1900
1899
|
}
|
|
1901
1900
|
/**
|
|
1902
1901
|
* Returns the rank of `member` in the sorted set stored at `key`, where
|
|
@@ -1912,7 +1911,7 @@ class BaseBatch {
|
|
|
1912
1911
|
* If `key` doesn't exist, or if `member` is not present in the set, `null` will be returned.
|
|
1913
1912
|
*/
|
|
1914
1913
|
zrevrank(key, member) {
|
|
1915
|
-
return this.addAndReturn((0,
|
|
1914
|
+
return this.addAndReturn((0, _1.createZRevRank)(key, member));
|
|
1916
1915
|
}
|
|
1917
1916
|
/**
|
|
1918
1917
|
* Returns the rank of `member` in the sorted set stored at `key` with its
|
|
@@ -1929,7 +1928,7 @@ class BaseBatch {
|
|
|
1929
1928
|
* If `key` doesn't exist, or if `member` is not present in the set, `null` will be returned.
|
|
1930
1929
|
*/
|
|
1931
1930
|
zrevrankWithScore(key, member) {
|
|
1932
|
-
return this.addAndReturn((0,
|
|
1931
|
+
return this.addAndReturn((0, _1.createZRevRankWithScore)(key, member));
|
|
1933
1932
|
}
|
|
1934
1933
|
/**
|
|
1935
1934
|
* Removes the existing timeout on `key`, turning the key from volatile (a key with an expire set) to
|
|
@@ -1942,7 +1941,7 @@ class BaseBatch {
|
|
|
1942
1941
|
* Command Response - `false` if `key` does not exist or does not have an associated timeout, `true` if the timeout has been removed.
|
|
1943
1942
|
*/
|
|
1944
1943
|
persist(key) {
|
|
1945
|
-
return this.addAndReturn((0,
|
|
1944
|
+
return this.addAndReturn((0, _1.createPersist)(key));
|
|
1946
1945
|
}
|
|
1947
1946
|
/** Executes a single command, without checking inputs. Every part of the command, including subcommands,
|
|
1948
1947
|
* should be added as a separate value in args.
|
|
@@ -1952,7 +1951,7 @@ class BaseBatch {
|
|
|
1952
1951
|
* Command Response - A response from Valkey with an `Object`.
|
|
1953
1952
|
*/
|
|
1954
1953
|
customCommand(args) {
|
|
1955
|
-
return this.addAndReturn((0,
|
|
1954
|
+
return this.addAndReturn((0, _1.createCustomCommand)(args));
|
|
1956
1955
|
}
|
|
1957
1956
|
/** Returns the element at index `index` in the list stored at `key`.
|
|
1958
1957
|
* The index is zero-based, so 0 means the first element, 1 the second element and so on.
|
|
@@ -1966,7 +1965,7 @@ class BaseBatch {
|
|
|
1966
1965
|
* If `index` is out of range or if `key` does not exist, null is returned.
|
|
1967
1966
|
*/
|
|
1968
1967
|
lindex(key, index) {
|
|
1969
|
-
return this.addAndReturn((0,
|
|
1968
|
+
return this.addAndReturn((0, _1.createLIndex)(key, index));
|
|
1970
1969
|
}
|
|
1971
1970
|
/**
|
|
1972
1971
|
* Inserts `element` in the list at `key` either before or after the `pivot`.
|
|
@@ -1984,7 +1983,7 @@ class BaseBatch {
|
|
|
1984
1983
|
* If the `pivot` wasn't found, returns `0`.
|
|
1985
1984
|
*/
|
|
1986
1985
|
linsert(key, position, pivot, element) {
|
|
1987
|
-
return this.addAndReturn((0,
|
|
1986
|
+
return this.addAndReturn((0, _1.createLInsert)(key, position, pivot, element));
|
|
1988
1987
|
}
|
|
1989
1988
|
/**
|
|
1990
1989
|
* Adds an entry to the specified stream stored at `key`. If the `key` doesn't exist, the stream is created.
|
|
@@ -1998,7 +1997,7 @@ class BaseBatch {
|
|
|
1998
1997
|
* Command Response - The id of the added entry, or `null` if `options.makeStream` is set to `false` and no stream with the matching `key` exists.
|
|
1999
1998
|
*/
|
|
2000
1999
|
xadd(key, values, options) {
|
|
2001
|
-
return this.addAndReturn((0,
|
|
2000
|
+
return this.addAndReturn((0, _1.createXAdd)(key, values, options));
|
|
2002
2001
|
}
|
|
2003
2002
|
/**
|
|
2004
2003
|
* Removes the specified entries by id from a stream, and returns the number of entries deleted.
|
|
@@ -2012,7 +2011,7 @@ class BaseBatch {
|
|
|
2012
2011
|
* `ids`, if the specified `ids` don't exist in the stream.
|
|
2013
2012
|
*/
|
|
2014
2013
|
xdel(key, ids) {
|
|
2015
|
-
return this.addAndReturn((0,
|
|
2014
|
+
return this.addAndReturn((0, _1.createXDel)(key, ids));
|
|
2016
2015
|
}
|
|
2017
2016
|
/**
|
|
2018
2017
|
* Trims the stream stored at `key` by evicting older entries.
|
|
@@ -2024,7 +2023,7 @@ class BaseBatch {
|
|
|
2024
2023
|
* Command Response - The number of entries deleted from the stream. If `key` doesn't exist, 0 is returned.
|
|
2025
2024
|
*/
|
|
2026
2025
|
xtrim(key, options) {
|
|
2027
|
-
return this.addAndReturn((0,
|
|
2026
|
+
return this.addAndReturn((0, _1.createXTrim)(key, options));
|
|
2028
2027
|
}
|
|
2029
2028
|
/**
|
|
2030
2029
|
* Returns information about the stream stored at `key`.
|
|
@@ -2039,7 +2038,7 @@ class BaseBatch {
|
|
|
2039
2038
|
* The response comes in format `GlideRecord<StreamEntries | GlideRecord<StreamEntries | GlideRecord<StreamEntries>[]>[]>`, see {@link GlideRecord}.
|
|
2040
2039
|
*/
|
|
2041
2040
|
xinfoStream(key, fullOptions) {
|
|
2042
|
-
return this.addAndReturn((0,
|
|
2041
|
+
return this.addAndReturn((0, _1.createXInfoStream)(key, fullOptions ?? false));
|
|
2043
2042
|
}
|
|
2044
2043
|
/**
|
|
2045
2044
|
* Returns the list of all consumer groups and their attributes for the stream stored at `key`.
|
|
@@ -2053,7 +2052,7 @@ class BaseBatch {
|
|
|
2053
2052
|
* The response comes in format `GlideRecord<GlideString | number | null>[]`, see {@link GlideRecord}.
|
|
2054
2053
|
*/
|
|
2055
2054
|
xinfoGroups(key) {
|
|
2056
|
-
return this.addAndReturn((0,
|
|
2055
|
+
return this.addAndReturn((0, _1.createXInfoGroups)(key));
|
|
2057
2056
|
}
|
|
2058
2057
|
/**
|
|
2059
2058
|
* Returns the server time.
|
|
@@ -2065,7 +2064,7 @@ class BaseBatch {
|
|
|
2065
2064
|
* - The amount of microseconds already elapsed in the current second.
|
|
2066
2065
|
*/
|
|
2067
2066
|
time() {
|
|
2068
|
-
return this.addAndReturn((0,
|
|
2067
|
+
return this.addAndReturn((0, _1.createTime)());
|
|
2069
2068
|
}
|
|
2070
2069
|
/**
|
|
2071
2070
|
* Returns stream entries matching a given range of entry IDs.
|
|
@@ -2088,7 +2087,7 @@ class BaseBatch {
|
|
|
2088
2087
|
* The response comes in format `GlideRecord<[GlideString, GlideString][]> | null`, see {@link GlideRecord}.
|
|
2089
2088
|
*/
|
|
2090
2089
|
xrange(key, start, end, count) {
|
|
2091
|
-
return this.addAndReturn((0,
|
|
2090
|
+
return this.addAndReturn((0, _1.createXRange)(key, start, end, count));
|
|
2092
2091
|
}
|
|
2093
2092
|
/**
|
|
2094
2093
|
* Returns stream entries matching a given range of entry IDs in reverse order. Equivalent to {@link xrange} but returns the
|
|
@@ -2112,7 +2111,7 @@ class BaseBatch {
|
|
|
2112
2111
|
* The response comes in format `GlideRecord<[GlideString, GlideString][]> | null`, see {@link GlideRecord}.
|
|
2113
2112
|
*/
|
|
2114
2113
|
xrevrange(key, end, start, count) {
|
|
2115
|
-
return this.addAndReturn((0,
|
|
2114
|
+
return this.addAndReturn((0, _1.createXRevRange)(key, end, start, count));
|
|
2116
2115
|
}
|
|
2117
2116
|
/**
|
|
2118
2117
|
* Reads entries from the given streams.
|
|
@@ -2131,7 +2130,7 @@ class BaseBatch {
|
|
|
2131
2130
|
return { key: e[0], value: e[1] };
|
|
2132
2131
|
});
|
|
2133
2132
|
}
|
|
2134
|
-
return this.addAndReturn((0,
|
|
2133
|
+
return this.addAndReturn((0, _1.createXRead)(keys_and_ids, options));
|
|
2135
2134
|
}
|
|
2136
2135
|
/**
|
|
2137
2136
|
* Reads entries from the given streams owned by a consumer group.
|
|
@@ -2154,7 +2153,7 @@ class BaseBatch {
|
|
|
2154
2153
|
return { key: e[0], value: e[1] };
|
|
2155
2154
|
});
|
|
2156
2155
|
}
|
|
2157
|
-
return this.addAndReturn((0,
|
|
2156
|
+
return this.addAndReturn((0, _1.createXReadGroup)(group, consumer, keys_and_ids, options));
|
|
2158
2157
|
}
|
|
2159
2158
|
/**
|
|
2160
2159
|
* Returns the number of entries in the stream stored at `key`.
|
|
@@ -2166,7 +2165,7 @@ class BaseBatch {
|
|
|
2166
2165
|
* Command Response - The number of entries in the stream. If `key` does not exist, returns `0`.
|
|
2167
2166
|
*/
|
|
2168
2167
|
xlen(key) {
|
|
2169
|
-
return this.addAndReturn((0,
|
|
2168
|
+
return this.addAndReturn((0, _1.createXLen)(key));
|
|
2170
2169
|
}
|
|
2171
2170
|
/**
|
|
2172
2171
|
* Returns stream message summary information for pending messages matching a given range of IDs.
|
|
@@ -2180,7 +2179,7 @@ class BaseBatch {
|
|
|
2180
2179
|
* See example of {@link BaseClient.xpending|xpending} for more details.
|
|
2181
2180
|
*/
|
|
2182
2181
|
xpending(key, group) {
|
|
2183
|
-
return this.addAndReturn((0,
|
|
2182
|
+
return this.addAndReturn((0, _1.createXPending)(key, group));
|
|
2184
2183
|
}
|
|
2185
2184
|
/**
|
|
2186
2185
|
* Returns stream message summary information for pending messages matching a given range of IDs.
|
|
@@ -2195,7 +2194,7 @@ class BaseBatch {
|
|
|
2195
2194
|
* See example of {@link BaseClient.xpendingWithOptions|xpendingWithOptions} for more details.
|
|
2196
2195
|
*/
|
|
2197
2196
|
xpendingWithOptions(key, group, options) {
|
|
2198
|
-
return this.addAndReturn((0,
|
|
2197
|
+
return this.addAndReturn((0, _1.createXPending)(key, group, options));
|
|
2199
2198
|
}
|
|
2200
2199
|
/**
|
|
2201
2200
|
* Returns the list of all consumers and their attributes for the given consumer group of the
|
|
@@ -2208,7 +2207,7 @@ class BaseBatch {
|
|
|
2208
2207
|
* The response comes in format `GlideRecord<GlideString | number>[]`, see {@link GlideRecord}.
|
|
2209
2208
|
*/
|
|
2210
2209
|
xinfoConsumers(key, group) {
|
|
2211
|
-
return this.addAndReturn((0,
|
|
2210
|
+
return this.addAndReturn((0, _1.createXInfoConsumers)(key, group));
|
|
2212
2211
|
}
|
|
2213
2212
|
/**
|
|
2214
2213
|
* Changes the ownership of a pending message.
|
|
@@ -2226,7 +2225,7 @@ class BaseBatch {
|
|
|
2226
2225
|
* The response comes in format `GlideRecord<[GlideString, GlideString][]>`, see {@link GlideRecord}.
|
|
2227
2226
|
*/
|
|
2228
2227
|
xclaim(key, group, consumer, minIdleTime, ids, options) {
|
|
2229
|
-
return this.addAndReturn((0,
|
|
2228
|
+
return this.addAndReturn((0, _1.createXClaim)(key, group, consumer, minIdleTime, ids, options));
|
|
2230
2229
|
}
|
|
2231
2230
|
/**
|
|
2232
2231
|
* Changes the ownership of a pending message. This function returns an `array` with
|
|
@@ -2244,7 +2243,7 @@ class BaseBatch {
|
|
|
2244
2243
|
* Command Response - An `array` of message ids claimed by the consumer.
|
|
2245
2244
|
*/
|
|
2246
2245
|
xclaimJustId(key, group, consumer, minIdleTime, ids, options) {
|
|
2247
|
-
return this.addAndReturn((0,
|
|
2246
|
+
return this.addAndReturn((0, _1.createXClaim)(key, group, consumer, minIdleTime, ids, options, true));
|
|
2248
2247
|
}
|
|
2249
2248
|
/**
|
|
2250
2249
|
* Transfers ownership of pending stream entries that match the specified criteria.
|
|
@@ -2273,7 +2272,7 @@ class BaseBatch {
|
|
|
2273
2272
|
* The response comes in format `[GlideString, GlideRecord<[GlideString, GlideString][]>, GlideString[]?]`, see {@link GlideRecord}.
|
|
2274
2273
|
*/
|
|
2275
2274
|
xautoclaim(key, group, consumer, minIdleTime, start, options) {
|
|
2276
|
-
return this.addAndReturn((0,
|
|
2275
|
+
return this.addAndReturn((0, _1.createXAutoClaim)(key, group, consumer, minIdleTime, start, options?.count));
|
|
2277
2276
|
}
|
|
2278
2277
|
/**
|
|
2279
2278
|
* Transfers ownership of pending stream entries that match the specified criteria.
|
|
@@ -2300,7 +2299,7 @@ class BaseBatch {
|
|
|
2300
2299
|
* These IDs are deleted from the Pending Entries List.
|
|
2301
2300
|
*/
|
|
2302
2301
|
xautoclaimJustId(key, group, consumer, minIdleTime, start, options) {
|
|
2303
|
-
return this.addAndReturn((0,
|
|
2302
|
+
return this.addAndReturn((0, _1.createXAutoClaim)(key, group, consumer, minIdleTime, start, options?.count, true));
|
|
2304
2303
|
}
|
|
2305
2304
|
/**
|
|
2306
2305
|
* Creates a new consumer group uniquely identified by `groupname` for the stream
|
|
@@ -2317,7 +2316,7 @@ class BaseBatch {
|
|
|
2317
2316
|
* Command Response - `"OK"`.
|
|
2318
2317
|
*/
|
|
2319
2318
|
xgroupCreate(key, groupName, id, options) {
|
|
2320
|
-
return this.addAndReturn((0,
|
|
2319
|
+
return this.addAndReturn((0, _1.createXGroupCreate)(key, groupName, id, options));
|
|
2321
2320
|
}
|
|
2322
2321
|
/**
|
|
2323
2322
|
* Destroys the consumer group `groupname` for the stream stored at `key`.
|
|
@@ -2330,7 +2329,7 @@ class BaseBatch {
|
|
|
2330
2329
|
* Command Response - `true` if the consumer group is destroyed. Otherwise, `false`.
|
|
2331
2330
|
*/
|
|
2332
2331
|
xgroupDestroy(key, groupName) {
|
|
2333
|
-
return this.addAndReturn((0,
|
|
2332
|
+
return this.addAndReturn((0, _1.createXGroupDestroy)(key, groupName));
|
|
2334
2333
|
}
|
|
2335
2334
|
/**
|
|
2336
2335
|
* Creates a consumer named `consumerName` in the consumer group `groupName` for the stream stored at `key`.
|
|
@@ -2344,7 +2343,7 @@ class BaseBatch {
|
|
|
2344
2343
|
* Command Response - `true` if the consumer is created. Otherwise, returns `false`.
|
|
2345
2344
|
*/
|
|
2346
2345
|
xgroupCreateConsumer(key, groupName, consumerName) {
|
|
2347
|
-
return this.addAndReturn((0,
|
|
2346
|
+
return this.addAndReturn((0, _1.createXGroupCreateConsumer)(key, groupName, consumerName));
|
|
2348
2347
|
}
|
|
2349
2348
|
/**
|
|
2350
2349
|
* Deletes a consumer named `consumerName` in the consumer group `groupName` for the stream stored at `key`.
|
|
@@ -2358,7 +2357,7 @@ class BaseBatch {
|
|
|
2358
2357
|
* Command Response - The number of pending messages the `consumer` had before it was deleted.
|
|
2359
2358
|
*/
|
|
2360
2359
|
xgroupDelConsumer(key, groupName, consumerName) {
|
|
2361
|
-
return this.addAndReturn((0,
|
|
2360
|
+
return this.addAndReturn((0, _1.createXGroupDelConsumer)(key, groupName, consumerName));
|
|
2362
2361
|
}
|
|
2363
2362
|
/**
|
|
2364
2363
|
* Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.
|
|
@@ -2373,7 +2372,7 @@ class BaseBatch {
|
|
|
2373
2372
|
* Command Response - The number of messages that were successfully acknowledged.
|
|
2374
2373
|
*/
|
|
2375
2374
|
xack(key, group, ids) {
|
|
2376
|
-
return this.addAndReturn((0,
|
|
2375
|
+
return this.addAndReturn((0, _1.createXAck)(key, group, ids));
|
|
2377
2376
|
}
|
|
2378
2377
|
/**
|
|
2379
2378
|
* Sets the last delivered ID for a consumer group.
|
|
@@ -2390,7 +2389,7 @@ class BaseBatch {
|
|
|
2390
2389
|
* Command Response - `"OK"`.
|
|
2391
2390
|
*/
|
|
2392
2391
|
xgroupSetId(key, groupName, id, options) {
|
|
2393
|
-
return this.addAndReturn((0,
|
|
2392
|
+
return this.addAndReturn((0, _1.createXGroupSetid)(key, groupName, id, options?.entriesRead));
|
|
2394
2393
|
}
|
|
2395
2394
|
/**
|
|
2396
2395
|
* Renames `key` to `newkey`.
|
|
@@ -2404,7 +2403,7 @@ class BaseBatch {
|
|
|
2404
2403
|
* Command Response - If the `key` was successfully renamed, return "OK". If `key` does not exist, an error is thrown.
|
|
2405
2404
|
*/
|
|
2406
2405
|
rename(key, newKey) {
|
|
2407
|
-
return this.addAndReturn((0,
|
|
2406
|
+
return this.addAndReturn((0, _1.createRename)(key, newKey));
|
|
2408
2407
|
}
|
|
2409
2408
|
/**
|
|
2410
2409
|
* Renames `key` to `newkey` if `newkey` does not yet exist.
|
|
@@ -2418,7 +2417,7 @@ class BaseBatch {
|
|
|
2418
2417
|
* If `key` does not exist, an error is thrown.
|
|
2419
2418
|
*/
|
|
2420
2419
|
renamenx(key, newKey) {
|
|
2421
|
-
return this.addAndReturn((0,
|
|
2420
|
+
return this.addAndReturn((0, _1.createRenameNX)(key, newKey));
|
|
2422
2421
|
}
|
|
2423
2422
|
/** Blocking list pop primitive.
|
|
2424
2423
|
* Pop an element from the tail of the first list that is non-empty,
|
|
@@ -2435,7 +2434,7 @@ class BaseBatch {
|
|
|
2435
2434
|
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
|
|
2436
2435
|
*/
|
|
2437
2436
|
brpop(keys, timeout) {
|
|
2438
|
-
return this.addAndReturn((0,
|
|
2437
|
+
return this.addAndReturn((0, _1.createBRPop)(keys, timeout));
|
|
2439
2438
|
}
|
|
2440
2439
|
/** Blocking list pop primitive.
|
|
2441
2440
|
* Pop an element from the head of the first list that is non-empty,
|
|
@@ -2452,7 +2451,7 @@ class BaseBatch {
|
|
|
2452
2451
|
* formatted as [key, value]. If no element could be popped and the timeout expired, returns `null`.
|
|
2453
2452
|
*/
|
|
2454
2453
|
blpop(keys, timeout) {
|
|
2455
|
-
return this.addAndReturn((0,
|
|
2454
|
+
return this.addAndReturn((0, _1.createBLPop)(keys, timeout));
|
|
2456
2455
|
}
|
|
2457
2456
|
/** Adds all elements to the HyperLogLog data structure stored at the specified `key`.
|
|
2458
2457
|
* Creates a new structure if the `key` does not exist.
|
|
@@ -2466,7 +2465,7 @@ class BaseBatch {
|
|
|
2466
2465
|
* altered, then returns `1`. Otherwise, returns `0`.
|
|
2467
2466
|
*/
|
|
2468
2467
|
pfadd(key, elements) {
|
|
2469
|
-
return this.addAndReturn((0,
|
|
2468
|
+
return this.addAndReturn((0, _1.createPfAdd)(key, elements));
|
|
2470
2469
|
}
|
|
2471
2470
|
/** Estimates the cardinality of the data stored in a HyperLogLog structure for a single key or
|
|
2472
2471
|
* calculates the combined cardinality of multiple keys by merging their HyperLogLogs temporarily.
|
|
@@ -2478,7 +2477,7 @@ class BaseBatch {
|
|
|
2478
2477
|
* The cardinality of a key that does not exist is `0`.
|
|
2479
2478
|
*/
|
|
2480
2479
|
pfcount(keys) {
|
|
2481
|
-
return this.addAndReturn((0,
|
|
2480
|
+
return this.addAndReturn((0, _1.createPfCount)(keys));
|
|
2482
2481
|
}
|
|
2483
2482
|
/**
|
|
2484
2483
|
* Merges multiple HyperLogLog values into a unique value. If the destination variable exists, it is
|
|
@@ -2491,7 +2490,7 @@ class BaseBatch {
|
|
|
2491
2490
|
* Command Response - A simple "OK" response.
|
|
2492
2491
|
*/
|
|
2493
2492
|
pfmerge(destination, sourceKeys) {
|
|
2494
|
-
return this.addAndReturn((0,
|
|
2493
|
+
return this.addAndReturn((0, _1.createPfMerge)(destination, sourceKeys));
|
|
2495
2494
|
}
|
|
2496
2495
|
/**
|
|
2497
2496
|
* Returns the internal encoding for the Valkey object stored at `key`.
|
|
@@ -2504,7 +2503,7 @@ class BaseBatch {
|
|
|
2504
2503
|
* Otherwise, returns None.
|
|
2505
2504
|
*/
|
|
2506
2505
|
objectEncoding(key) {
|
|
2507
|
-
return this.addAndReturn((0,
|
|
2506
|
+
return this.addAndReturn((0, _1.createObjectEncoding)(key));
|
|
2508
2507
|
}
|
|
2509
2508
|
/**
|
|
2510
2509
|
* Returns the logarithmic access frequency counter of a Valkey object stored at `key`.
|
|
@@ -2517,7 +2516,7 @@ class BaseBatch {
|
|
|
2517
2516
|
* the object stored at `key` as a `number`. Otherwise, returns `null`.
|
|
2518
2517
|
*/
|
|
2519
2518
|
objectFreq(key) {
|
|
2520
|
-
return this.addAndReturn((0,
|
|
2519
|
+
return this.addAndReturn((0, _1.createObjectFreq)(key));
|
|
2521
2520
|
}
|
|
2522
2521
|
/**
|
|
2523
2522
|
* Returns the time in seconds since the last access to the value stored at `key`.
|
|
@@ -2529,7 +2528,7 @@ class BaseBatch {
|
|
|
2529
2528
|
* Command Response - If `key` exists, returns the idle time in seconds. Otherwise, returns `null`.
|
|
2530
2529
|
*/
|
|
2531
2530
|
objectIdletime(key) {
|
|
2532
|
-
return this.addAndReturn((0,
|
|
2531
|
+
return this.addAndReturn((0, _1.createObjectIdletime)(key));
|
|
2533
2532
|
}
|
|
2534
2533
|
/**
|
|
2535
2534
|
* Returns the reference count of the object stored at `key`.
|
|
@@ -2542,7 +2541,7 @@ class BaseBatch {
|
|
|
2542
2541
|
* Otherwise, returns `null`.
|
|
2543
2542
|
*/
|
|
2544
2543
|
objectRefcount(key) {
|
|
2545
|
-
return this.addAndReturn((0,
|
|
2544
|
+
return this.addAndReturn((0, _1.createObjectRefcount)(key));
|
|
2546
2545
|
}
|
|
2547
2546
|
/**
|
|
2548
2547
|
* Displays a piece of generative computer art and the server version.
|
|
@@ -2554,7 +2553,7 @@ class BaseBatch {
|
|
|
2554
2553
|
* Command Response - A piece of generative computer art along with the current server version.
|
|
2555
2554
|
*/
|
|
2556
2555
|
lolwut(options) {
|
|
2557
|
-
return this.addAndReturn((0,
|
|
2556
|
+
return this.addAndReturn((0, _1.createLolwut)(options));
|
|
2558
2557
|
}
|
|
2559
2558
|
/**
|
|
2560
2559
|
* Blocks the current client until all the previous write commands are successfully transferred and
|
|
@@ -2570,7 +2569,7 @@ class BaseBatch {
|
|
|
2570
2569
|
* current connection.
|
|
2571
2570
|
*/
|
|
2572
2571
|
wait(numreplicas, timeout) {
|
|
2573
|
-
return this.addAndReturn((0,
|
|
2572
|
+
return this.addAndReturn((0, _1.createWait)(numreplicas, timeout));
|
|
2574
2573
|
}
|
|
2575
2574
|
/**
|
|
2576
2575
|
* Invokes a previously loaded function.
|
|
@@ -2586,7 +2585,7 @@ class BaseBatch {
|
|
|
2586
2585
|
* Command Response - The invoked function's return value.
|
|
2587
2586
|
*/
|
|
2588
2587
|
fcall(func, keys, args) {
|
|
2589
|
-
return this.addAndReturn((0,
|
|
2588
|
+
return this.addAndReturn((0, _1.createFCall)(func, keys, args));
|
|
2590
2589
|
}
|
|
2591
2590
|
/**
|
|
2592
2591
|
* Invokes a previously loaded read-only function.
|
|
@@ -2602,7 +2601,7 @@ class BaseBatch {
|
|
|
2602
2601
|
* Command Response - The invoked function's return value.
|
|
2603
2602
|
*/
|
|
2604
2603
|
fcallReadonly(func, keys, args) {
|
|
2605
|
-
return this.addAndReturn((0,
|
|
2604
|
+
return this.addAndReturn((0, _1.createFCallReadOnly)(func, keys, args));
|
|
2606
2605
|
}
|
|
2607
2606
|
/**
|
|
2608
2607
|
* Deletes a library and all its functions.
|
|
@@ -2615,7 +2614,7 @@ class BaseBatch {
|
|
|
2615
2614
|
* Command Response - `"OK"`.
|
|
2616
2615
|
*/
|
|
2617
2616
|
functionDelete(libraryCode) {
|
|
2618
|
-
return this.addAndReturn((0,
|
|
2617
|
+
return this.addAndReturn((0, _1.createFunctionDelete)(libraryCode));
|
|
2619
2618
|
}
|
|
2620
2619
|
/**
|
|
2621
2620
|
* Loads a library to Valkey.
|
|
@@ -2630,7 +2629,7 @@ class BaseBatch {
|
|
|
2630
2629
|
* Command Response - The library name that was loaded.
|
|
2631
2630
|
*/
|
|
2632
2631
|
functionLoad(libraryCode, replace) {
|
|
2633
|
-
return this.addAndReturn((0,
|
|
2632
|
+
return this.addAndReturn((0, _1.createFunctionLoad)(libraryCode, replace));
|
|
2634
2633
|
}
|
|
2635
2634
|
/**
|
|
2636
2635
|
* Deletes all function libraries.
|
|
@@ -2642,7 +2641,7 @@ class BaseBatch {
|
|
|
2642
2641
|
* Command Response - `"OK"`.
|
|
2643
2642
|
*/
|
|
2644
2643
|
functionFlush(mode) {
|
|
2645
|
-
return this.addAndReturn((0,
|
|
2644
|
+
return this.addAndReturn((0, _1.createFunctionFlush)(mode));
|
|
2646
2645
|
}
|
|
2647
2646
|
/**
|
|
2648
2647
|
* Returns information about the functions and libraries.
|
|
@@ -2655,7 +2654,7 @@ class BaseBatch {
|
|
|
2655
2654
|
* Command Response - Info about all or selected libraries and their functions in {@link FunctionListResponse} format.
|
|
2656
2655
|
*/
|
|
2657
2656
|
functionList(options) {
|
|
2658
|
-
return this.addAndReturn((0,
|
|
2657
|
+
return this.addAndReturn((0, _1.createFunctionList)(options));
|
|
2659
2658
|
}
|
|
2660
2659
|
/**
|
|
2661
2660
|
* Returns information about the function that's currently running and information about the
|
|
@@ -2670,7 +2669,7 @@ class BaseBatch {
|
|
|
2670
2669
|
* - `"engines"` with information about available engines and their stats.
|
|
2671
2670
|
*/
|
|
2672
2671
|
functionStats() {
|
|
2673
|
-
return this.addAndReturn((0,
|
|
2672
|
+
return this.addAndReturn((0, _1.createFunctionStats)());
|
|
2674
2673
|
}
|
|
2675
2674
|
/**
|
|
2676
2675
|
* Returns the serialized payload of all loaded libraries.
|
|
@@ -2682,7 +2681,7 @@ class BaseBatch {
|
|
|
2682
2681
|
* Command Response - The serialized payload of all loaded libraries.
|
|
2683
2682
|
*/
|
|
2684
2683
|
functionDump() {
|
|
2685
|
-
return this.addAndReturn((0,
|
|
2684
|
+
return this.addAndReturn((0, _1.createFunctionDump)());
|
|
2686
2685
|
}
|
|
2687
2686
|
/**
|
|
2688
2687
|
* Restores libraries from the serialized payload returned by {@link functionDump}.
|
|
@@ -2696,7 +2695,7 @@ class BaseBatch {
|
|
|
2696
2695
|
* Command Response - `"OK"`.
|
|
2697
2696
|
*/
|
|
2698
2697
|
functionRestore(payload, policy) {
|
|
2699
|
-
return this.addAndReturn((0,
|
|
2698
|
+
return this.addAndReturn((0, _1.createFunctionRestore)(payload, policy));
|
|
2700
2699
|
}
|
|
2701
2700
|
/**
|
|
2702
2701
|
* Deletes all the keys of all the existing databases. This command never fails.
|
|
@@ -2708,7 +2707,7 @@ class BaseBatch {
|
|
|
2708
2707
|
* Command Response - `"OK"`.
|
|
2709
2708
|
*/
|
|
2710
2709
|
flushall(mode) {
|
|
2711
|
-
return this.addAndReturn((0,
|
|
2710
|
+
return this.addAndReturn((0, _1.createFlushAll)(mode));
|
|
2712
2711
|
}
|
|
2713
2712
|
/**
|
|
2714
2713
|
* Deletes all the keys of the currently selected database. This command never fails.
|
|
@@ -2720,7 +2719,7 @@ class BaseBatch {
|
|
|
2720
2719
|
* Command Response - `"OK"`.
|
|
2721
2720
|
*/
|
|
2722
2721
|
flushdb(mode) {
|
|
2723
|
-
return this.addAndReturn((0,
|
|
2722
|
+
return this.addAndReturn((0, _1.createFlushDB)(mode));
|
|
2724
2723
|
}
|
|
2725
2724
|
/**
|
|
2726
2725
|
* Returns the index of the first occurrence of `element` inside the list specified by `key`. If no
|
|
@@ -2738,7 +2737,7 @@ class BaseBatch {
|
|
|
2738
2737
|
* option is specified, then the function returns an `array` of indices of matching elements within the list.
|
|
2739
2738
|
*/
|
|
2740
2739
|
lpos(key, element, options) {
|
|
2741
|
-
return this.addAndReturn((0,
|
|
2740
|
+
return this.addAndReturn((0, _1.createLPos)(key, element, options));
|
|
2742
2741
|
}
|
|
2743
2742
|
/**
|
|
2744
2743
|
* Returns the number of keys in the currently selected database.
|
|
@@ -2748,7 +2747,7 @@ class BaseBatch {
|
|
|
2748
2747
|
* Command Response - The number of keys in the currently selected database.
|
|
2749
2748
|
*/
|
|
2750
2749
|
dbsize() {
|
|
2751
|
-
return this.addAndReturn((0,
|
|
2750
|
+
return this.addAndReturn((0, _1.createDBSize)());
|
|
2752
2751
|
}
|
|
2753
2752
|
/**
|
|
2754
2753
|
* Counts the number of set bits (population counting) in the string stored at `key`. The `options` argument can
|
|
@@ -2764,7 +2763,7 @@ class BaseBatch {
|
|
|
2764
2763
|
* Otherwise, if `key` is missing, returns `0` as it is treated as an empty string.
|
|
2765
2764
|
*/
|
|
2766
2765
|
bitcount(key, options) {
|
|
2767
|
-
return this.addAndReturn((0,
|
|
2766
|
+
return this.addAndReturn((0, _1.createBitCount)(key, options));
|
|
2768
2767
|
}
|
|
2769
2768
|
/**
|
|
2770
2769
|
* Adds geospatial members with their positions to the specified sorted set stored at `key`.
|
|
@@ -2782,7 +2781,7 @@ class BaseBatch {
|
|
|
2782
2781
|
* `true` in the options, returns the number of elements updated in the sorted set.
|
|
2783
2782
|
*/
|
|
2784
2783
|
geoadd(key, membersToGeospatialData, options) {
|
|
2785
|
-
return this.addAndReturn((0,
|
|
2784
|
+
return this.addAndReturn((0, _1.createGeoAdd)(key, membersToGeospatialData, options));
|
|
2786
2785
|
}
|
|
2787
2786
|
/**
|
|
2788
2787
|
* Returns the members of a sorted set populated with geospatial information using {@link geoadd},
|
|
@@ -2816,7 +2815,7 @@ class BaseBatch {
|
|
|
2816
2815
|
* - The coordinates as a two item `array` of floating point `number`s.
|
|
2817
2816
|
*/
|
|
2818
2817
|
geosearch(key, searchFrom, searchBy, resultOptions) {
|
|
2819
|
-
return this.addAndReturn((0,
|
|
2818
|
+
return this.addAndReturn((0, _1.createGeoSearch)(key, searchFrom, searchBy, resultOptions));
|
|
2820
2819
|
}
|
|
2821
2820
|
/**
|
|
2822
2821
|
* Searches for members in a sorted set stored at `source` representing geospatial data
|
|
@@ -2842,7 +2841,7 @@ class BaseBatch {
|
|
|
2842
2841
|
* Command Response - The number of elements in the resulting sorted set stored at `destination`.
|
|
2843
2842
|
*/
|
|
2844
2843
|
geosearchstore(destination, source, searchFrom, searchBy, resultOptions) {
|
|
2845
|
-
return this.addAndReturn((0,
|
|
2844
|
+
return this.addAndReturn((0, _1.createGeoSearchStore)(destination, source, searchFrom, searchBy, resultOptions));
|
|
2846
2845
|
}
|
|
2847
2846
|
/**
|
|
2848
2847
|
* Returns the positions (longitude, latitude) of all the specified `members` of the
|
|
@@ -2858,7 +2857,7 @@ class BaseBatch {
|
|
|
2858
2857
|
* If a member does not exist, its position will be `null`.
|
|
2859
2858
|
*/
|
|
2860
2859
|
geopos(key, members) {
|
|
2861
|
-
return this.addAndReturn((0,
|
|
2860
|
+
return this.addAndReturn((0, _1.createGeoPos)(key, members));
|
|
2862
2861
|
}
|
|
2863
2862
|
/**
|
|
2864
2863
|
* Pops member-score pairs from the first non-empty sorted set, with the given `keys`
|
|
@@ -2877,7 +2876,7 @@ class BaseBatch {
|
|
|
2877
2876
|
* If no member could be popped, returns `null`.
|
|
2878
2877
|
*/
|
|
2879
2878
|
zmpop(keys, modifier, count) {
|
|
2880
|
-
return this.addAndReturn((0,
|
|
2879
|
+
return this.addAndReturn((0, _1.createZMPop)(keys, modifier, count));
|
|
2881
2880
|
}
|
|
2882
2881
|
/**
|
|
2883
2882
|
* Pops a member-score pair from the first non-empty sorted set, with the given `keys` being
|
|
@@ -2899,7 +2898,7 @@ class BaseBatch {
|
|
|
2899
2898
|
* If no member could be popped, returns `null`.
|
|
2900
2899
|
*/
|
|
2901
2900
|
bzmpop(keys, modifier, timeout, count) {
|
|
2902
|
-
return this.addAndReturn((0,
|
|
2901
|
+
return this.addAndReturn((0, _1.createBZMPop)(keys, modifier, timeout, count));
|
|
2903
2902
|
}
|
|
2904
2903
|
/**
|
|
2905
2904
|
* Increments the score of `member` in the sorted set stored at `key` by `increment`.
|
|
@@ -2915,7 +2914,7 @@ class BaseBatch {
|
|
|
2915
2914
|
* Command Response - The new score of `member`.
|
|
2916
2915
|
*/
|
|
2917
2916
|
zincrby(key, increment, member) {
|
|
2918
|
-
return this.addAndReturn((0,
|
|
2917
|
+
return this.addAndReturn((0, _1.createZIncrBy)(key, increment, member));
|
|
2919
2918
|
}
|
|
2920
2919
|
/**
|
|
2921
2920
|
* Iterates incrementally over a sorted set.
|
|
@@ -2935,7 +2934,7 @@ class BaseBatch {
|
|
|
2935
2934
|
* If `options.noScores` is to `true`, the second element will only contain the members without scores.
|
|
2936
2935
|
*/
|
|
2937
2936
|
zscan(key, cursor, options) {
|
|
2938
|
-
return this.addAndReturn((0,
|
|
2937
|
+
return this.addAndReturn((0, _1.createZScan)(key, cursor, options));
|
|
2939
2938
|
}
|
|
2940
2939
|
/**
|
|
2941
2940
|
* Returns the distance between `member1` and `member2` saved in the geospatial index stored at `key`.
|
|
@@ -2953,7 +2952,7 @@ class BaseBatch {
|
|
|
2953
2952
|
* or if the key does not exist.
|
|
2954
2953
|
*/
|
|
2955
2954
|
geodist(key, member1, member2, options) {
|
|
2956
|
-
return this.addAndReturn((0,
|
|
2955
|
+
return this.addAndReturn((0, _1.createGeoDist)(key, member1, member2, options?.unit));
|
|
2957
2956
|
}
|
|
2958
2957
|
/**
|
|
2959
2958
|
* Returns the `GeoHash` strings representing the positions of all the specified `members` in the sorted set stored at `key`.
|
|
@@ -2967,7 +2966,7 @@ class BaseBatch {
|
|
|
2967
2966
|
* If a member does not exist in the sorted set, a `null` value is returned for that member.
|
|
2968
2967
|
*/
|
|
2969
2968
|
geohash(key, members) {
|
|
2970
|
-
return this.addAndReturn((0,
|
|
2969
|
+
return this.addAndReturn((0, _1.createGeoHash)(key, members));
|
|
2971
2970
|
}
|
|
2972
2971
|
/**
|
|
2973
2972
|
* Returns `UNIX TIME` of the last DB save timestamp or startup timestamp if no save
|
|
@@ -2978,7 +2977,7 @@ class BaseBatch {
|
|
|
2978
2977
|
* Command Response - `UNIX TIME` of the last DB save executed with success.
|
|
2979
2978
|
*/
|
|
2980
2979
|
lastsave() {
|
|
2981
|
-
return this.addAndReturn((0,
|
|
2980
|
+
return this.addAndReturn((0, _1.createLastSave)());
|
|
2982
2981
|
}
|
|
2983
2982
|
/**
|
|
2984
2983
|
* Returns all the longest common subsequences combined between strings stored at `key1` and `key2`.
|
|
@@ -2993,7 +2992,7 @@ class BaseBatch {
|
|
|
2993
2992
|
* An empty `String` is returned if the keys do not exist or have no common subsequences.
|
|
2994
2993
|
*/
|
|
2995
2994
|
lcs(key1, key2) {
|
|
2996
|
-
return this.addAndReturn((0,
|
|
2995
|
+
return this.addAndReturn((0, _1.createLCS)(key1, key2));
|
|
2997
2996
|
}
|
|
2998
2997
|
/**
|
|
2999
2998
|
* Returns the total length of all the longest common subsequences between strings stored at `key1` and `key2`.
|
|
@@ -3007,7 +3006,7 @@ class BaseBatch {
|
|
|
3007
3006
|
* Command Response - The total length of all the longest common subsequences between the 2 strings.
|
|
3008
3007
|
*/
|
|
3009
3008
|
lcsLen(key1, key2) {
|
|
3010
|
-
return this.addAndReturn((0,
|
|
3009
|
+
return this.addAndReturn((0, _1.createLCS)(key1, key2, { len: true }));
|
|
3011
3010
|
}
|
|
3012
3011
|
/**
|
|
3013
3012
|
* Returns the indices and lengths of the longest common subsequences between strings stored at
|
|
@@ -3034,7 +3033,7 @@ class BaseBatch {
|
|
|
3034
3033
|
* See example of {@link BaseClient.lcsIdx|lcsIdx} for more details.
|
|
3035
3034
|
*/
|
|
3036
3035
|
lcsIdx(key1, key2, options) {
|
|
3037
|
-
return this.addAndReturn((0,
|
|
3036
|
+
return this.addAndReturn((0, _1.createLCS)(key1, key2, { idx: options ?? {} }));
|
|
3038
3037
|
}
|
|
3039
3038
|
/**
|
|
3040
3039
|
* Updates the last access time of the specified keys.
|
|
@@ -3046,7 +3045,7 @@ class BaseBatch {
|
|
|
3046
3045
|
* Command Response - The number of keys that were updated. A key is ignored if it doesn't exist.
|
|
3047
3046
|
*/
|
|
3048
3047
|
touch(keys) {
|
|
3049
|
-
return this.addAndReturn((0,
|
|
3048
|
+
return this.addAndReturn((0, _1.createTouch)(keys));
|
|
3050
3049
|
}
|
|
3051
3050
|
/**
|
|
3052
3051
|
* Returns a random existing key name from the currently selected database.
|
|
@@ -3056,7 +3055,7 @@ class BaseBatch {
|
|
|
3056
3055
|
* Command Response - A random existing key name from the currently selected database.
|
|
3057
3056
|
*/
|
|
3058
3057
|
randomKey() {
|
|
3059
|
-
return this.addAndReturn((0,
|
|
3058
|
+
return this.addAndReturn((0, _1.createRandomKey)());
|
|
3060
3059
|
}
|
|
3061
3060
|
/**
|
|
3062
3061
|
* Overwrites part of the string stored at `key`, starting at the specified byte `offset`,
|
|
@@ -3072,7 +3071,7 @@ class BaseBatch {
|
|
|
3072
3071
|
* Command Response - The length of the string stored at `key` after it was modified.
|
|
3073
3072
|
*/
|
|
3074
3073
|
setrange(key, offset, value) {
|
|
3075
|
-
return this.addAndReturn((0,
|
|
3074
|
+
return this.addAndReturn((0, _1.createSetRange)(key, offset, value));
|
|
3076
3075
|
}
|
|
3077
3076
|
/**
|
|
3078
3077
|
* Appends a `value` to a `key`. If `key` does not exist it is created and set as an empty string,
|
|
@@ -3086,7 +3085,7 @@ class BaseBatch {
|
|
|
3086
3085
|
* Command Response - The length of the string after appending the value.
|
|
3087
3086
|
*/
|
|
3088
3087
|
append(key, value) {
|
|
3089
|
-
return this.addAndReturn((0,
|
|
3088
|
+
return this.addAndReturn((0, _1.createAppend)(key, value));
|
|
3090
3089
|
}
|
|
3091
3090
|
/**
|
|
3092
3091
|
* Pops one or more elements from the first non-empty list from the provided `keys`.
|
|
@@ -3102,7 +3101,7 @@ class BaseBatch {
|
|
|
3102
3101
|
* If no member could be popped, returns `null`.
|
|
3103
3102
|
*/
|
|
3104
3103
|
lmpop(keys, direction, count) {
|
|
3105
|
-
return this.addAndReturn((0,
|
|
3104
|
+
return this.addAndReturn((0, _1.createLMPop)(keys, direction, count));
|
|
3106
3105
|
}
|
|
3107
3106
|
/**
|
|
3108
3107
|
* Blocks the connection until it pops one or more elements from the first non-empty list from the
|
|
@@ -3121,7 +3120,7 @@ class BaseBatch {
|
|
|
3121
3120
|
* If no member could be popped and the timeout expired, returns `null`.
|
|
3122
3121
|
*/
|
|
3123
3122
|
blmpop(keys, direction, timeout, count) {
|
|
3124
|
-
return this.addAndReturn((0,
|
|
3123
|
+
return this.addAndReturn((0, _1.createBLMPop)(keys, direction, timeout, count));
|
|
3125
3124
|
}
|
|
3126
3125
|
/**
|
|
3127
3126
|
* Lists the currently active channels.
|
|
@@ -3135,7 +3134,7 @@ class BaseBatch {
|
|
|
3135
3134
|
* If no pattern is specified, all active channels are returned.
|
|
3136
3135
|
*/
|
|
3137
3136
|
pubsubChannels(pattern) {
|
|
3138
|
-
return this.addAndReturn((0,
|
|
3137
|
+
return this.addAndReturn((0, _1.createPubSubChannels)(pattern));
|
|
3139
3138
|
}
|
|
3140
3139
|
/**
|
|
3141
3140
|
* Returns the number of unique patterns that are subscribed to by clients.
|
|
@@ -3149,7 +3148,7 @@ class BaseBatch {
|
|
|
3149
3148
|
* Command Response - The number of unique patterns.
|
|
3150
3149
|
*/
|
|
3151
3150
|
pubsubNumPat() {
|
|
3152
|
-
return this.addAndReturn((0,
|
|
3151
|
+
return this.addAndReturn((0, _1.createPubSubNumPat)());
|
|
3153
3152
|
}
|
|
3154
3153
|
/**
|
|
3155
3154
|
* Returns the number of subscribers (exclusive of clients subscribed to patterns) for the specified channels.
|
|
@@ -3161,7 +3160,7 @@ class BaseBatch {
|
|
|
3161
3160
|
* Command Response - A list of the channel names and their numbers of subscribers.
|
|
3162
3161
|
*/
|
|
3163
3162
|
pubsubNumSub(channels) {
|
|
3164
|
-
return this.addAndReturn((0,
|
|
3163
|
+
return this.addAndReturn((0, _1.createPubSubNumSub)(channels));
|
|
3165
3164
|
}
|
|
3166
3165
|
/**
|
|
3167
3166
|
* Sorts the elements in the list, set, or sorted set at `key` and returns the result.
|
|
@@ -3182,7 +3181,7 @@ class BaseBatch {
|
|
|
3182
3181
|
* Command Response - An `Array` of sorted elements.
|
|
3183
3182
|
*/
|
|
3184
3183
|
sort(key, options) {
|
|
3185
|
-
return this.addAndReturn((0,
|
|
3184
|
+
return this.addAndReturn((0, _1.createSort)(key, options));
|
|
3186
3185
|
}
|
|
3187
3186
|
/**
|
|
3188
3187
|
* Sorts the elements in the list, set, or sorted set at `key` and returns the result.
|
|
@@ -3203,7 +3202,7 @@ class BaseBatch {
|
|
|
3203
3202
|
* Command Response - An `Array` of sorted elements
|
|
3204
3203
|
*/
|
|
3205
3204
|
sortReadOnly(key, options) {
|
|
3206
|
-
return this.addAndReturn((0,
|
|
3205
|
+
return this.addAndReturn((0, _1.createSortReadOnly)(key, options));
|
|
3207
3206
|
}
|
|
3208
3207
|
/**
|
|
3209
3208
|
* Sorts the elements in the list, set, or sorted set at `key` and stores the result in
|
|
@@ -3226,7 +3225,7 @@ class BaseBatch {
|
|
|
3226
3225
|
* Command Response - The number of elements in the sorted key stored at `destination`.
|
|
3227
3226
|
*/
|
|
3228
3227
|
sortStore(key, destination, options) {
|
|
3229
|
-
return this.addAndReturn((0,
|
|
3228
|
+
return this.addAndReturn((0, _1.createSort)(key, options, destination));
|
|
3230
3229
|
}
|
|
3231
3230
|
}
|
|
3232
3231
|
exports.BaseBatch = BaseBatch;
|
|
@@ -3282,7 +3281,7 @@ class Batch extends BaseBatch {
|
|
|
3282
3281
|
* Command Response - A simple `"OK"` response.
|
|
3283
3282
|
*/
|
|
3284
3283
|
select(index) {
|
|
3285
|
-
return this.addAndReturn((0,
|
|
3284
|
+
return this.addAndReturn((0, _1.createSelect)(index));
|
|
3286
3285
|
}
|
|
3287
3286
|
/**
|
|
3288
3287
|
* Copies the value stored at the `source` to the `destination` key. If `destinationDB` is specified,
|
|
@@ -3303,7 +3302,7 @@ class Batch extends BaseBatch {
|
|
|
3303
3302
|
* Command Response - `true` if `source` was copied, `false` if the `source` was not copied.
|
|
3304
3303
|
*/
|
|
3305
3304
|
copy(source, destination, options) {
|
|
3306
|
-
return this.addAndReturn((0,
|
|
3305
|
+
return this.addAndReturn((0, _1.createCopy)(source, destination, options));
|
|
3307
3306
|
}
|
|
3308
3307
|
/**
|
|
3309
3308
|
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
@@ -3317,7 +3316,7 @@ class Batch extends BaseBatch {
|
|
|
3317
3316
|
* database or does not exist in the source database.
|
|
3318
3317
|
*/
|
|
3319
3318
|
move(key, dbIndex) {
|
|
3320
|
-
return this.addAndReturn((0,
|
|
3319
|
+
return this.addAndReturn((0, _1.createMove)(key, dbIndex));
|
|
3321
3320
|
}
|
|
3322
3321
|
/** Publish a message on pubsub channel.
|
|
3323
3322
|
*
|
|
@@ -3330,7 +3329,7 @@ class Batch extends BaseBatch {
|
|
|
3330
3329
|
* Note that this value does not include subscriptions that configured on replicas.
|
|
3331
3330
|
*/
|
|
3332
3331
|
publish(message, channel) {
|
|
3333
|
-
return this.addAndReturn((0,
|
|
3332
|
+
return this.addAndReturn((0, _1.createPublish)(message, channel));
|
|
3334
3333
|
}
|
|
3335
3334
|
}
|
|
3336
3335
|
exports.Batch = Batch;
|
|
@@ -3389,7 +3388,7 @@ class ClusterBatch extends BaseBatch {
|
|
|
3389
3388
|
* Command Response - `true` if `source` was copied, `false` if the `source` was not copied.
|
|
3390
3389
|
*/
|
|
3391
3390
|
copy(source, destination, options) {
|
|
3392
|
-
return this.addAndReturn((0,
|
|
3391
|
+
return this.addAndReturn((0, _1.createCopy)(source, destination, options));
|
|
3393
3392
|
}
|
|
3394
3393
|
/** Publish a message on pubsub channel.
|
|
3395
3394
|
* This command aggregates PUBLISH and SPUBLISH commands functionalities.
|
|
@@ -3405,7 +3404,7 @@ class ClusterBatch extends BaseBatch {
|
|
|
3405
3404
|
* Command Response - Number of subscriptions in primary node that received the message.
|
|
3406
3405
|
*/
|
|
3407
3406
|
publish(message, channel, sharded = false) {
|
|
3408
|
-
return this.addAndReturn((0,
|
|
3407
|
+
return this.addAndReturn((0, _1.createPublish)(message, channel, sharded));
|
|
3409
3408
|
}
|
|
3410
3409
|
/**
|
|
3411
3410
|
* Lists the currently active shard channels.
|
|
@@ -3420,7 +3419,7 @@ class ClusterBatch extends BaseBatch {
|
|
|
3420
3419
|
* If no pattern is specified, all active shard channels are returned.
|
|
3421
3420
|
*/
|
|
3422
3421
|
pubsubShardChannels(pattern) {
|
|
3423
|
-
return this.addAndReturn((0,
|
|
3422
|
+
return this.addAndReturn((0, _1.createPubsubShardChannels)(pattern));
|
|
3424
3423
|
}
|
|
3425
3424
|
/**
|
|
3426
3425
|
* Returns the number of subscribers (exclusive of clients subscribed to patterns) for the specified shard channels.
|
|
@@ -3433,7 +3432,7 @@ class ClusterBatch extends BaseBatch {
|
|
|
3433
3432
|
* Command Response - A list of the shard channel names and their numbers of subscribers.
|
|
3434
3433
|
*/
|
|
3435
3434
|
pubsubShardNumSub(channels) {
|
|
3436
|
-
return this.addAndReturn((0,
|
|
3435
|
+
return this.addAndReturn((0, _1.createPubSubShardNumSub)(channels));
|
|
3437
3436
|
}
|
|
3438
3437
|
}
|
|
3439
3438
|
exports.ClusterBatch = ClusterBatch;
|