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 12, 2024
1 parent fe6873d commit 74960fd
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 @@ -252,12 +252,12 @@ export type ReturnType =
/** 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 @@ -967,8 +967,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 @@ -989,8 +989,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 @@ -1133,8 +1133,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 @@ -1324,7 +1324,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 @@ -1905,9 +1904,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 @@ -2805,9 +2803,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 @@ -4416,8 +4414,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 @@ -4438,8 +4436,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 @@ -4463,9 +4461,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 @@ -4492,9 +4489,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 @@ -4583,7 +4579,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 @@ -4600,7 +4596,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 @@ -5017,10 +5013,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 @@ -652,9 +652,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 @@ -1021,12 +1021,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 @@ -2985,10 +2983,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 @@ -3214,9 +3211,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 @@ -3381,8 +3378,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 @@ -3519,8 +3516,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 74960fd

Please sign in to comment.