Skip to content

Commit

Permalink
Fix zrangeWithScores.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Jan 8, 2025
1 parent de9526d commit 4af4dfd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#### Fixes

* Node: Fix `zrangeWithScores` (disallow `RangeByLex` as it is not supported) ([#2926](https://github.com/valkey-io/valkey-glide/pull/2926))

#### Operational Enhancements

## 1.2.1 (2024-12-29)
Expand Down
3 changes: 1 addition & 2 deletions node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4443,7 +4443,6 @@ export class BaseClient {
* @param key - The key of the sorted set.
* @param rangeQuery - The range query object representing the type of range query to perform.
* - For range queries by index (rank), use {@link RangeByIndex}.
* - For range queries by lexicographical order, use {@link RangeByLex}.
* - For range queries by score, use {@link RangeByScore}.
* @param options - (Optional) Additional parameters:
* - (Optional) `reverse`: if `true`, reverses the sorted set, with index `0` as the element with the highest score.
Expand Down Expand Up @@ -4476,7 +4475,7 @@ export class BaseClient {
*/
public async zrangeWithScores(
key: GlideString,
rangeQuery: RangeByScore | RangeByLex | RangeByIndex,
rangeQuery: RangeByScore | RangeByIndex,
options?: { reverse?: boolean } & DecoderOption,
): Promise<SortedSetDataType> {
return this.createWritePromise<GlideRecord<number>>(
Expand Down
3 changes: 1 addition & 2 deletions node/src/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,6 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* @param key - The key of the sorted set.
* @param rangeQuery - The range query object representing the type of range query to perform.
* - For range queries by index (rank), use {@link RangeByIndex}.
* - For range queries by lexicographical order, use {@link RangeByLex}.
* - For range queries by score, use {@link RangeByScore}.
* @param reverse - If `true`, reverses the sorted set, with index `0` as the element with the highest score.
*
Expand All @@ -1999,7 +1998,7 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
*/
public zrangeWithScores(
key: GlideString,
rangeQuery: RangeByScore | RangeByLex | RangeByIndex,
rangeQuery: RangeByScore | RangeByIndex,
reverse = false,
): T {
return this.addAndReturn(
Expand Down

0 comments on commit 4af4dfd

Please sign in to comment.