Skip to content

Commit

Permalink
Another pass to clean remarks
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Carbonetto <[email protected]>
  • Loading branch information
acarbonetto committed Aug 14, 2024
1 parent 85f7c75 commit 2c6ecf6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 35 deletions.
44 changes: 19 additions & 25 deletions node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ class PointerResponse {
/** Represents the credentials for connecting to a server. */
export type RedisCredentials = {
/**
* The username that will be used for authenticating connections to the Redis servers.
* The username that will be used for authenticating connections to the Valkey servers.
* If not supplied, "default" will be used.
*/
username?: string;
/**
* The password that will be used for authenticating connections to the Redis servers.
* The password that will be used for authenticating connections to the Valkey servers.
*/
password: string;
};
Expand Down Expand Up @@ -1084,8 +1084,8 @@ export class BaseClient {
/** Retrieve the values of multiple keys.
*
* @see {@link https://valkey.io/commands/mget/|valkey.io} for details.
*
* @remarks When in cluster mode, the command may route to multiple nodes when `keys` map to different hash slots.
*
* @param keys - A list of keys to retrieve values for.
* @returns A list of values corresponding to the provided keys. If a key is not found,
* its corresponding value in the list will be null.
Expand All @@ -1106,8 +1106,8 @@ export class BaseClient {
/** Set multiple keys to multiple values in a single operation.
*
* @see {@link https://valkey.io/commands/mset/|valkey.io} for details.
*
* @remarks When in cluster mode, the command may route to multiple nodes when keys in `keyValueMap` map to different hash slots.
*
* @param keyValueMap - A key-value map consisting of keys and their respective values to set.
* @returns always "OK".
*
Expand Down Expand Up @@ -1250,8 +1250,8 @@ export class BaseClient {
* `destination`.
*
* @see {@link https://valkey.io/commands/bitop/|valkey.io} for more details.
*
* @remarks When in cluster mode, `destination` and all `keys` must map to the same hash slot.
*
* @param operation - The bitwise operation to perform.
* @param destination - The key that will store the resulting string.
* @param keys - The list of keys to perform the bitwise operation on.
Expand Down Expand Up @@ -1441,7 +1441,6 @@ export class BaseClient {
* Reads the array of bits representing the string that is held at `key` based on the specified `subcommands`.
*
* @see {@link https://valkey.io/commands/bitfield_ro/|valkey.io} for more details.
*
* @remarks Since Valkey version 6.0.0.
*
* @param key - The key of the string.
Expand Down Expand Up @@ -2067,9 +2066,8 @@ export class BaseClient {
* `BLMOVE` is the blocking variant of {@link lmove}.
*
* @see {@link https://valkey.io/commands/blmove/|valkey.io} for details.
* @remarks
* 1. When in cluster mode, both `source` and `destination` must map to the same hash slot.
* 2. `BLMOVE` is a client blocking command, see https://github.com/aws/glide-for-redis/wiki/General-Concepts#blocking-commands for more details and best practices.
* @remarks When in cluster mode, both `source` and `destination` must map to the same hash slot.
* @remarks `BLMOVE` is a client blocking command, see {@link https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands|Valkey Glide Wiki} for more details and best practices.
* @remarks Since Valkey version 6.2.0.
*
* @param source - The key to the source list.
Expand Down Expand Up @@ -2967,9 +2965,9 @@ export class BaseClient {
}

/** Invokes a Lua script with its keys and arguments.
* This method simplifies the process of invoking scripts on a Redis server by using an object that represents a Lua script.
* This method simplifies the process of invoking scripts on a Valkey server by using an object that represents a Lua script.
* The script loading, argument preparation, and execution will all be handled internally. If the script has not already been loaded,
* it will be loaded automatically using the Redis `SCRIPT LOAD` command. After that, it will be invoked using the Redis `EVALSHA` command
* it will be loaded automatically using the `SCRIPT LOAD` command. After that, it will be invoked using the `EVALSHA` command.
*
* @see {@link https://valkey.io/commands/script-load/} and {@link https://valkey.io/commands/evalsha/} for details.
*
Expand Down Expand Up @@ -4696,8 +4694,8 @@ export class BaseClient {
* If `newkey` already exists it is overwritten.
*
* @see {@link https://valkey.io/commands/rename/|valkey.io} for more details.
*
* @remarks When in cluster mode, `key` and `newKey` must map to the same hash slot.
*
* @param key - The key to rename.
* @param newKey - The new name of the key.
* @returns - If the `key` was successfully renamed, return "OK". If `key` does not exist, an error is thrown.
Expand All @@ -4718,8 +4716,8 @@ export class BaseClient {
* Renames `key` to `newkey` if `newkey` does not yet exist.
*
* @see {@link https://valkey.io/commands/renamenx/|valkey.io} for more details.
*
* @remarks When in cluster mode, `key` and `newKey` must map to the same hash slot.
*
* @param key - The key to rename.
* @param newKey - The new name of the key.
* @returns - If the `key` was successfully renamed, returns `true`. Otherwise, returns `false`.
Expand All @@ -4743,9 +4741,8 @@ export class BaseClient {
* Blocks the connection when there are no elements to pop from any of the given lists.
*
* @see {@link https://valkey.io/commands/brpop/|valkey.io} for more details.
* @remarks
* 1. When in cluster mode, all `keys` must map to the same hash slot.
* 2. `BRPOP` is a blocking command, see [Blocking Commands](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands) for more details and best practices.
* @remarks When in cluster mode, all `keys` must map to the same hash slot.
* @remarks `BRPOP` is a blocking command, see [Blocking Commands](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands) for more details and best practices.
*
* @param keys - The `keys` of the lists to pop from.
* @param timeout - The `timeout` in seconds.
Expand All @@ -4772,9 +4769,8 @@ export class BaseClient {
* Blocks the connection when there are no elements to pop from any of the given lists.
*
* @see {@link https://valkey.io/commands/blpop/|valkey.io} for more details.
* @remarks
* 1. When in cluster mode, all `keys` must map to the same hash slot.
* 2. `BLPOP` is a blocking command, see [Blocking Commands](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands) for more details and best practices.
* @remarks When in cluster mode, all `keys` must map to the same hash slot.
* @remarks `BLPOP` is a blocking command, see [Blocking Commands](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands) for more details and best practices.
*
* @param keys - The `keys` of the lists to pop from.
* @param timeout - The `timeout` in seconds.
Expand Down Expand Up @@ -4863,7 +4859,7 @@ export class BaseClient {
return this.createWritePromise(createPfMerge(destination, sourceKeys));
}

/** Returns the internal encoding for the Redis object stored at `key`.
/** Returns the internal encoding for the Valkey object stored at `key`.
*
* @see {@link https://valkey.io/commands/object-encoding/|valkey.io} for more details.
*
Expand All @@ -4880,7 +4876,7 @@ export class BaseClient {
return this.createWritePromise(createObjectEncoding(key));
}

/** Returns the logarithmic access frequency counter of a Redis object stored at `key`.
/** Returns the logarithmic access frequency counter of a Valkey object stored at `key`.
*
* @see {@link https://valkey.io/commands/object-freq/|valkey.io} for more details.
*
Expand Down Expand Up @@ -5297,10 +5293,8 @@ export class BaseClient {
* to pop from any of the given sorted sets. `BZMPOP` is the blocking variant of {@link zmpop}.
*
* @see {@link https://valkey.io/commands/bzmpop/|valkey.io} for more details.
* @remarks
* 1. When in cluster mode, all `keys` must map to the same hash slot.
* 2. `BZMPOP` is a client blocking command, see {@link https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands | the wiki}
* for more details and best practices.
* @remarks When in cluster mode, all `keys` must map to the same hash slot.
* @remarks `BZMPOP` is a client blocking command, see {@link https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands | Valkey Glide Wiki} for more details and best practices.
* @remarks Since Valkey version 7.0.0.
*
* @param keys - The keys of the sorted sets.
Expand Down
2 changes: 1 addition & 1 deletion node/src/GlideClusterClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,9 @@ export class GlideClusterClient extends BaseClient {
* removes the `destination` key first if it already exists, otherwise performs no action.
*
* @see {@link https://valkey.io/commands/copy/|valkey.io} for details.
* @remarks When in cluster mode, `source` and `destination` must map to the same hash slot.
* @remarks Since Valkey version 6.2.0.
*
* @remarks When in cluster mode, `source` and `destination` must map to the same hash slot.
* @param source - The key to the source value.
* @param destination - The key where the value should be copied to.
* @param replace - (Optional) If `true`, the `destination` key should be removed before copying the
Expand Down
15 changes: 6 additions & 9 deletions node/src/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,12 +1066,10 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* `BLMOVE` is the blocking variant of {@link lmove}.
*
* @see {@link https://valkey.io/commands/blmove/|valkey.io} for details.
* @remarks When in cluster mode, both `source` and `destination` must map to the same hash slot.
* @remarks `BLMOVE` is a client blocking command, see {@link https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands|Valkey Glide Wiki} for more details and best practices.
* @remarks Since Valkey version 6.2.0.
*
* @remarks
* 1. When in cluster mode, both `source` and `destination` must map to the same hash slot.
* 2. `BLMOVE` is a client blocking command, see https://github.com/aws/glide-for-redis/wiki/General-Concepts#blocking-commands for more details and best practices.
*
* @param source - The key to the source list.
* @param destination - The key to the destination list.
* @param whereFrom - The {@link ListDirection} to remove the element from.
Expand Down Expand Up @@ -3129,10 +3127,9 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* to pop from any of the given sorted sets. `BZMPOP` is the blocking variant of {@link zmpop}.
*
* @see {@link https://valkey.io/commands/bzmpop/|valkey.io} for details.
* @remarks `BZMPOP` is a client blocking command, see {@link https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands | Valkey Glide Wiki} for more details and best practices.
* @remarks Since Valkey version 7.0.0.
*
* @remarks `BZMPOP` is a client blocking command, see {@link https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#blocking-commands | the wiki}
* for more details and best practices.
* @param keys - The keys of the sorted sets.
* @param modifier - The element pop criteria - either {@link ScoreFilter.MIN} or
* {@link ScoreFilter.MAX} to pop the member with the lowest/highest score accordingly.
Expand Down Expand Up @@ -3358,9 +3355,9 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* Pops one or more elements from the first non-empty list from the provided `keys`.
*
* @see {@link https://valkey.io/commands/lmpop/|valkey.io} for details.
* @remarks When in cluster mode, `source` and `destination` must map to the same hash slot.
* @remarks Since Valkey version 7.0.0.
*
* @remarks When in cluster mode, `source` and `destination` must map to the same hash slot.
* @param keys - An array of keys to lists.
* @param direction - The direction based on which elements are popped from - see {@link ListDirection}.
* @param count - (Optional) The maximum number of popped elements.
Expand Down Expand Up @@ -3525,8 +3522,8 @@ export class Transaction extends BaseTransaction<Transaction> {
* To get the sort result without storing it into a key, see {@link sort} or {@link sortReadOnly}.
*
* @see {@link https://valkey.io/commands/sort/|valkey.io} for more details.
*
* @remarks When in cluster mode, `destination` and `key` must map to the same hash slot.
*
* @param key - The key of the list, set, or sorted set to be sorted.
* @param destination - The key where the sorted result will be stored.
* @param options - (Optional) {@link SortOptions}.
Expand Down Expand Up @@ -3663,8 +3660,8 @@ export class ClusterTransaction extends BaseTransaction<ClusterTransaction> {
* To get the sort result without storing it into a key, see {@link sort} or {@link sortReadOnly}.
*
* @see {@link https://valkey.io/commands/sort|valkey.io} for more details.
*
* @remarks When in cluster mode, `destination` and `key` must map to the same hash slot.
*
* @param key - The key of the list, set, or sorted set to be sorted.
* @param destination - The key where the sorted result will be stored.
* @param options - (Optional) {@link SortClusterOptions}.
Expand Down

0 comments on commit 2c6ecf6

Please sign in to comment.