@valkey/valkey-glide 2.1.1-rc2 → 2.1.1
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 +17 -0
- package/build-ts/BaseClient.js +21 -0
- package/build-ts/GlideClient.d.ts +0 -32
- package/build-ts/GlideClient.js +0 -36
- package/package.json +7 -7
package/build-ts/BaseClient.d.ts
CHANGED
|
@@ -2434,6 +2434,23 @@ export declare class BaseClient {
|
|
|
2434
2434
|
* ```
|
|
2435
2435
|
*/
|
|
2436
2436
|
sadd(key: GlideString, members: GlideString[]): Promise<number>;
|
|
2437
|
+
/**
|
|
2438
|
+
* Changes the currently selected database.
|
|
2439
|
+
*
|
|
2440
|
+
* @see {@link https://valkey.io/commands/select/|valkey.io} for details.
|
|
2441
|
+
*
|
|
2442
|
+
* @param index - The index of the database to select.
|
|
2443
|
+
* @returns A simple `"OK"` response.
|
|
2444
|
+
*
|
|
2445
|
+
* @example
|
|
2446
|
+
* ```typescript
|
|
2447
|
+
* // Example usage of select method (NOT RECOMMENDED)
|
|
2448
|
+
* const result = await client.select(2);
|
|
2449
|
+
* console.log(result); // Output: 'OK'
|
|
2450
|
+
* // Note: Database selection will be lost on reconnection!
|
|
2451
|
+
* ```
|
|
2452
|
+
*/
|
|
2453
|
+
select(index: number): Promise<"OK">;
|
|
2437
2454
|
/** Removes the specified members from the set stored at `key`. Specified members that are not a member of this set are ignored.
|
|
2438
2455
|
*
|
|
2439
2456
|
* @see {@link https://valkey.io/commands/srem/|valkey.io} for details.
|
package/build-ts/BaseClient.js
CHANGED
|
@@ -2762,6 +2762,27 @@ class BaseClient {
|
|
|
2762
2762
|
async sadd(key, members) {
|
|
2763
2763
|
return this.createWritePromise((0, _1.createSAdd)(key, members));
|
|
2764
2764
|
}
|
|
2765
|
+
/**
|
|
2766
|
+
* Changes the currently selected database.
|
|
2767
|
+
*
|
|
2768
|
+
* @see {@link https://valkey.io/commands/select/|valkey.io} for details.
|
|
2769
|
+
*
|
|
2770
|
+
* @param index - The index of the database to select.
|
|
2771
|
+
* @returns A simple `"OK"` response.
|
|
2772
|
+
*
|
|
2773
|
+
* @example
|
|
2774
|
+
* ```typescript
|
|
2775
|
+
* // Example usage of select method (NOT RECOMMENDED)
|
|
2776
|
+
* const result = await client.select(2);
|
|
2777
|
+
* console.log(result); // Output: 'OK'
|
|
2778
|
+
* // Note: Database selection will be lost on reconnection!
|
|
2779
|
+
* ```
|
|
2780
|
+
*/
|
|
2781
|
+
async select(index) {
|
|
2782
|
+
return this.createWritePromise((0, _1.createSelect)(index), {
|
|
2783
|
+
decoder: Decoder.String,
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2765
2786
|
/** Removes the specified members from the set stored at `key`. Specified members that are not a member of this set are ignored.
|
|
2766
2787
|
*
|
|
2767
2788
|
* @see {@link https://valkey.io/commands/srem/|valkey.io} for details.
|
|
@@ -259,38 +259,6 @@ export declare class GlideClient extends BaseClient {
|
|
|
259
259
|
* ```
|
|
260
260
|
*/
|
|
261
261
|
info(sections?: InfoOptions[]): Promise<string>;
|
|
262
|
-
/**
|
|
263
|
-
* Changes the currently selected database.
|
|
264
|
-
*
|
|
265
|
-
* **WARNING**: This command is NOT RECOMMENDED for production use.
|
|
266
|
-
* Upon reconnection, the client will revert to the database_id specified
|
|
267
|
-
* in the client configuration (default: 0), NOT the database selected
|
|
268
|
-
* via this command.
|
|
269
|
-
*
|
|
270
|
-
* **RECOMMENDED APPROACH**: Use the `databaseId` parameter in client
|
|
271
|
-
* configuration instead:
|
|
272
|
-
*
|
|
273
|
-
* ```typescript
|
|
274
|
-
* const client = await GlideClient.createClient({
|
|
275
|
-
* addresses: [{ host: "localhost", port: 6379 }],
|
|
276
|
-
* databaseId: 5 // Recommended: persists across reconnections
|
|
277
|
-
* });
|
|
278
|
-
* ```
|
|
279
|
-
*
|
|
280
|
-
* @see {@link https://valkey.io/commands/select/|valkey.io} for details.
|
|
281
|
-
*
|
|
282
|
-
* @param index - The index of the database to select.
|
|
283
|
-
* @returns A simple `"OK"` response.
|
|
284
|
-
*
|
|
285
|
-
* @example
|
|
286
|
-
* ```typescript
|
|
287
|
-
* // Example usage of select method (NOT RECOMMENDED)
|
|
288
|
-
* const result = await client.select(2);
|
|
289
|
-
* console.log(result); // Output: 'OK'
|
|
290
|
-
* // Note: Database selection will be lost on reconnection!
|
|
291
|
-
* ```
|
|
292
|
-
*/
|
|
293
|
-
select(index: number): Promise<"OK">;
|
|
294
262
|
/**
|
|
295
263
|
* Gets the name of the primary's connection.
|
|
296
264
|
*
|
package/build-ts/GlideClient.js
CHANGED
|
@@ -225,42 +225,6 @@ class GlideClient extends _1.BaseClient {
|
|
|
225
225
|
decoder: _1.Decoder.String,
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
/**
|
|
229
|
-
* Changes the currently selected database.
|
|
230
|
-
*
|
|
231
|
-
* **WARNING**: This command is NOT RECOMMENDED for production use.
|
|
232
|
-
* Upon reconnection, the client will revert to the database_id specified
|
|
233
|
-
* in the client configuration (default: 0), NOT the database selected
|
|
234
|
-
* via this command.
|
|
235
|
-
*
|
|
236
|
-
* **RECOMMENDED APPROACH**: Use the `databaseId` parameter in client
|
|
237
|
-
* configuration instead:
|
|
238
|
-
*
|
|
239
|
-
* ```typescript
|
|
240
|
-
* const client = await GlideClient.createClient({
|
|
241
|
-
* addresses: [{ host: "localhost", port: 6379 }],
|
|
242
|
-
* databaseId: 5 // Recommended: persists across reconnections
|
|
243
|
-
* });
|
|
244
|
-
* ```
|
|
245
|
-
*
|
|
246
|
-
* @see {@link https://valkey.io/commands/select/|valkey.io} for details.
|
|
247
|
-
*
|
|
248
|
-
* @param index - The index of the database to select.
|
|
249
|
-
* @returns A simple `"OK"` response.
|
|
250
|
-
*
|
|
251
|
-
* @example
|
|
252
|
-
* ```typescript
|
|
253
|
-
* // Example usage of select method (NOT RECOMMENDED)
|
|
254
|
-
* const result = await client.select(2);
|
|
255
|
-
* console.log(result); // Output: 'OK'
|
|
256
|
-
* // Note: Database selection will be lost on reconnection!
|
|
257
|
-
* ```
|
|
258
|
-
*/
|
|
259
|
-
async select(index) {
|
|
260
|
-
return this.createWritePromise((0, _1.createSelect)(index), {
|
|
261
|
-
decoder: _1.Decoder.String,
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
228
|
/**
|
|
265
229
|
* Gets the name of the primary's connection.
|
|
266
230
|
*
|
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.1
|
|
7
|
+
"version": "2.1.1",
|
|
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.1
|
|
138
|
-
"@valkey/valkey-glide-darwin-arm64": "2.1.1
|
|
139
|
-
"@valkey/valkey-glide-linux-x64-gnu": "2.1.1
|
|
140
|
-
"@valkey/valkey-glide-linux-arm64-gnu": "2.1.1
|
|
141
|
-
"@valkey/valkey-glide-linux-x64-musl": "2.1.1
|
|
142
|
-
"@valkey/valkey-glide-linux-arm64-musl": "2.1.1
|
|
137
|
+
"@valkey/valkey-glide-darwin-x64": "2.1.1",
|
|
138
|
+
"@valkey/valkey-glide-darwin-arm64": "2.1.1",
|
|
139
|
+
"@valkey/valkey-glide-linux-x64-gnu": "2.1.1",
|
|
140
|
+
"@valkey/valkey-glide-linux-arm64-gnu": "2.1.1",
|
|
141
|
+
"@valkey/valkey-glide-linux-x64-musl": "2.1.1",
|
|
142
|
+
"@valkey/valkey-glide-linux-arm64-musl": "2.1.1"
|
|
143
143
|
}
|
|
144
144
|
}
|