@valkey/valkey-glide 2.1.0 → 2.1.1-rc1
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/build-ts/BaseClient.d.ts +19 -0
- package/build-ts/BaseClient.js +21 -0
- package/build-ts/Batch.d.ts +14 -12
- package/build-ts/Batch.js +16 -14
- package/build-ts/GlideClient.d.ts +0 -17
- package/build-ts/GlideClient.js +0 -19
- package/package.json +7 -7
package/build-ts/BaseClient.d.ts
CHANGED
|
@@ -841,6 +841,25 @@ export declare class BaseClient {
|
|
|
841
841
|
* ```
|
|
842
842
|
*/
|
|
843
843
|
msetnx(keysAndValues: Record<string, GlideString> | GlideRecord<GlideString>): Promise<boolean>;
|
|
844
|
+
/**
|
|
845
|
+
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
846
|
+
*
|
|
847
|
+
* @remarks Move is available for cluster mode since Valkey 9.0.0 and above.
|
|
848
|
+
*
|
|
849
|
+
* @see {@link https://valkey.io/commands/move/|valkey.io} for more details.
|
|
850
|
+
*
|
|
851
|
+
* @param key - The key to move.
|
|
852
|
+
* @param dbIndex - The index of the database to move `key` to.
|
|
853
|
+
* @returns `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
854
|
+
* database or does not exist in the source database.
|
|
855
|
+
*
|
|
856
|
+
* @example
|
|
857
|
+
* ```typescript
|
|
858
|
+
* const result = await client.move("key", 1);
|
|
859
|
+
* console.log(result); // Output: true
|
|
860
|
+
* ```
|
|
861
|
+
*/
|
|
862
|
+
move(key: GlideString, dbIndex: number): Promise<boolean>;
|
|
844
863
|
/** Increments the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
|
|
845
864
|
*
|
|
846
865
|
* @see {@link https://valkey.io/commands/incr/|valkey.io} for details.
|
package/build-ts/BaseClient.js
CHANGED
|
@@ -1052,6 +1052,27 @@ class BaseClient {
|
|
|
1052
1052
|
async msetnx(keysAndValues) {
|
|
1053
1053
|
return this.createWritePromise((0, _1.createMSetNX)(convertGlideRecord(keysAndValues)));
|
|
1054
1054
|
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
1057
|
+
*
|
|
1058
|
+
* @remarks Move is available for cluster mode since Valkey 9.0.0 and above.
|
|
1059
|
+
*
|
|
1060
|
+
* @see {@link https://valkey.io/commands/move/|valkey.io} for more details.
|
|
1061
|
+
*
|
|
1062
|
+
* @param key - The key to move.
|
|
1063
|
+
* @param dbIndex - The index of the database to move `key` to.
|
|
1064
|
+
* @returns `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
1065
|
+
* database or does not exist in the source database.
|
|
1066
|
+
*
|
|
1067
|
+
* @example
|
|
1068
|
+
* ```typescript
|
|
1069
|
+
* const result = await client.move("key", 1);
|
|
1070
|
+
* console.log(result); // Output: true
|
|
1071
|
+
* ```
|
|
1072
|
+
*/
|
|
1073
|
+
async move(key, dbIndex) {
|
|
1074
|
+
return this.createWritePromise((0, _1.createMove)(key, dbIndex));
|
|
1075
|
+
}
|
|
1055
1076
|
/** Increments the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
|
|
1056
1077
|
*
|
|
1057
1078
|
* @see {@link https://valkey.io/commands/incr/|valkey.io} for details.
|
package/build-ts/Batch.d.ts
CHANGED
|
@@ -215,6 +215,20 @@ export declare class BaseBatch<T extends BaseBatch<T>> {
|
|
|
215
215
|
* Command Response - `true` if all keys were set. `false` if no key was set.
|
|
216
216
|
*/
|
|
217
217
|
msetnx(keysAndValues: Record<string, GlideString> | GlideRecord<GlideString>): T;
|
|
218
|
+
/**
|
|
219
|
+
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
220
|
+
*
|
|
221
|
+
* @remarks Move is available for cluster mode since Valkey 9.0.0 and above.
|
|
222
|
+
*
|
|
223
|
+
* @see {@link https://valkey.io/commands/move/|valkey.io} for details.
|
|
224
|
+
*
|
|
225
|
+
* @param key - The key to move.
|
|
226
|
+
* @param dbIndex - The index of the database to move `key` to.
|
|
227
|
+
*
|
|
228
|
+
* Command Response - `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
229
|
+
* database or does not exist in the source database.
|
|
230
|
+
*/
|
|
231
|
+
move(key: GlideString, dbIndex: number): T;
|
|
218
232
|
/** Increments the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
|
|
219
233
|
* @see {@link https://valkey.io/commands/incr/|valkey.io} for details.
|
|
220
234
|
*
|
|
@@ -3110,18 +3124,6 @@ export declare class Batch extends BaseBatch<Batch> {
|
|
|
3110
3124
|
destinationDB?: number;
|
|
3111
3125
|
replace?: boolean;
|
|
3112
3126
|
}): Batch;
|
|
3113
|
-
/**
|
|
3114
|
-
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
3115
|
-
*
|
|
3116
|
-
* @see {@link https://valkey.io/commands/move/|valkey.io} for details.
|
|
3117
|
-
*
|
|
3118
|
-
* @param key - The key to move.
|
|
3119
|
-
* @param dbIndex - The index of the database to move `key` to.
|
|
3120
|
-
*
|
|
3121
|
-
* Command Response - `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
3122
|
-
* database or does not exist in the source database.
|
|
3123
|
-
*/
|
|
3124
|
-
move(key: GlideString, dbIndex: number): Batch;
|
|
3125
3127
|
/** Publish a message on pubsub channel.
|
|
3126
3128
|
*
|
|
3127
3129
|
* @see {@link https://valkey.io/commands/publish/|valkey.io} for more details.
|
package/build-ts/Batch.js
CHANGED
|
@@ -255,6 +255,22 @@ class BaseBatch {
|
|
|
255
255
|
msetnx(keysAndValues) {
|
|
256
256
|
return this.addAndReturn((0, _1.createMSetNX)((0, _1.convertGlideRecord)(keysAndValues)));
|
|
257
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
260
|
+
*
|
|
261
|
+
* @remarks Move is available for cluster mode since Valkey 9.0.0 and above.
|
|
262
|
+
*
|
|
263
|
+
* @see {@link https://valkey.io/commands/move/|valkey.io} for details.
|
|
264
|
+
*
|
|
265
|
+
* @param key - The key to move.
|
|
266
|
+
* @param dbIndex - The index of the database to move `key` to.
|
|
267
|
+
*
|
|
268
|
+
* Command Response - `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
269
|
+
* database or does not exist in the source database.
|
|
270
|
+
*/
|
|
271
|
+
move(key, dbIndex) {
|
|
272
|
+
return this.addAndReturn((0, _1.createMove)(key, dbIndex));
|
|
273
|
+
}
|
|
258
274
|
/** Increments the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
|
|
259
275
|
* @see {@link https://valkey.io/commands/incr/|valkey.io} for details.
|
|
260
276
|
*
|
|
@@ -3541,20 +3557,6 @@ class Batch extends BaseBatch {
|
|
|
3541
3557
|
copy(source, destination, options) {
|
|
3542
3558
|
return this.addAndReturn((0, _1.createCopy)(source, destination, options));
|
|
3543
3559
|
}
|
|
3544
|
-
/**
|
|
3545
|
-
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
3546
|
-
*
|
|
3547
|
-
* @see {@link https://valkey.io/commands/move/|valkey.io} for details.
|
|
3548
|
-
*
|
|
3549
|
-
* @param key - The key to move.
|
|
3550
|
-
* @param dbIndex - The index of the database to move `key` to.
|
|
3551
|
-
*
|
|
3552
|
-
* Command Response - `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
3553
|
-
* database or does not exist in the source database.
|
|
3554
|
-
*/
|
|
3555
|
-
move(key, dbIndex) {
|
|
3556
|
-
return this.addAndReturn((0, _1.createMove)(key, dbIndex));
|
|
3557
|
-
}
|
|
3558
3560
|
/** Publish a message on pubsub channel.
|
|
3559
3561
|
*
|
|
3560
3562
|
* @see {@link https://valkey.io/commands/publish/|valkey.io} for more details.
|
|
@@ -454,23 +454,6 @@ export declare class GlideClient extends BaseClient {
|
|
|
454
454
|
destinationDB?: number;
|
|
455
455
|
replace?: boolean;
|
|
456
456
|
}): Promise<boolean>;
|
|
457
|
-
/**
|
|
458
|
-
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
459
|
-
*
|
|
460
|
-
* @see {@link https://valkey.io/commands/move/|valkey.io} for more details.
|
|
461
|
-
*
|
|
462
|
-
* @param key - The key to move.
|
|
463
|
-
* @param dbIndex - The index of the database to move `key` to.
|
|
464
|
-
* @returns `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
465
|
-
* database or does not exist in the source database.
|
|
466
|
-
*
|
|
467
|
-
* @example
|
|
468
|
-
* ```typescript
|
|
469
|
-
* const result = await client.move("key", 1);
|
|
470
|
-
* console.log(result); // Output: true
|
|
471
|
-
* ```
|
|
472
|
-
*/
|
|
473
|
-
move(key: GlideString, dbIndex: number): Promise<boolean>;
|
|
474
457
|
/**
|
|
475
458
|
* Displays a piece of generative computer art and the server version.
|
|
476
459
|
*
|
package/build-ts/GlideClient.js
CHANGED
|
@@ -447,25 +447,6 @@ class GlideClient extends _1.BaseClient {
|
|
|
447
447
|
async copy(source, destination, options) {
|
|
448
448
|
return this.createWritePromise((0, _1.createCopy)(source, destination, options));
|
|
449
449
|
}
|
|
450
|
-
/**
|
|
451
|
-
* Move `key` from the currently selected database to the database specified by `dbIndex`.
|
|
452
|
-
*
|
|
453
|
-
* @see {@link https://valkey.io/commands/move/|valkey.io} for more details.
|
|
454
|
-
*
|
|
455
|
-
* @param key - The key to move.
|
|
456
|
-
* @param dbIndex - The index of the database to move `key` to.
|
|
457
|
-
* @returns `true` if `key` was moved, or `false` if the `key` already exists in the destination
|
|
458
|
-
* database or does not exist in the source database.
|
|
459
|
-
*
|
|
460
|
-
* @example
|
|
461
|
-
* ```typescript
|
|
462
|
-
* const result = await client.move("key", 1);
|
|
463
|
-
* console.log(result); // Output: true
|
|
464
|
-
* ```
|
|
465
|
-
*/
|
|
466
|
-
async move(key, dbIndex) {
|
|
467
|
-
return this.createWritePromise((0, _1.createMove)(key, dbIndex));
|
|
468
|
-
}
|
|
469
450
|
/**
|
|
470
451
|
* Displays a piece of generative computer art and the server version.
|
|
471
452
|
*
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "build-ts/index.js",
|
|
5
5
|
"module": "build-ts/index.js",
|
|
6
6
|
"types": "build-ts/index.d.ts",
|
|
7
|
-
"version": "2.1.
|
|
7
|
+
"version": "2.1.1-rc1",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"import": {
|
|
@@ -134,11 +134,11 @@
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
"optionalDependencies": {
|
|
137
|
-
"@valkey/valkey-glide-darwin-x64": "2.1.
|
|
138
|
-
"@valkey/valkey-glide-darwin-arm64": "2.1.
|
|
139
|
-
"@valkey/valkey-glide-linux-x64-gnu": "2.1.
|
|
140
|
-
"@valkey/valkey-glide-linux-arm64-gnu": "2.1.
|
|
141
|
-
"@valkey/valkey-glide-linux-x64-musl": "2.1.
|
|
142
|
-
"@valkey/valkey-glide-linux-arm64-musl": "2.1.
|
|
137
|
+
"@valkey/valkey-glide-darwin-x64": "2.1.1-rc1",
|
|
138
|
+
"@valkey/valkey-glide-darwin-arm64": "2.1.1-rc1",
|
|
139
|
+
"@valkey/valkey-glide-linux-x64-gnu": "2.1.1-rc1",
|
|
140
|
+
"@valkey/valkey-glide-linux-arm64-gnu": "2.1.1-rc1",
|
|
141
|
+
"@valkey/valkey-glide-linux-x64-musl": "2.1.1-rc1",
|
|
142
|
+
"@valkey/valkey-glide-linux-arm64-musl": "2.1.1-rc1"
|
|
143
143
|
}
|
|
144
144
|
}
|