Skip to content

Node: Move SELECT command from GlideClient to BaseClient#4849

Merged
affonsov merged 5 commits intorelease-2.1from
node/affonsov-select-command-for-cluster-mode
Oct 7, 2025
Merged

Node: Move SELECT command from GlideClient to BaseClient#4849
affonsov merged 5 commits intorelease-2.1from
node/affonsov-select-command-for-cluster-mode

Conversation

@affonsov
Copy link
Copy Markdown
Collaborator

@affonsov affonsov commented Oct 2, 2025

Description

This PR moves the SELECT command from GlideClient to BaseClient, making it available for both standalone and cluster clients.

Changes

Core Changes

  • Moved select() method from GlideClient to BaseClient
  • Moved createSelect import to BaseClient.ts from GlideClient.ts
  • Method is now available on both GlideClient and GlideClusterClient

Documentation Updates

  • Simplified the documentation for the select() method
  • Removed the extensive warning about reconnection behavior from the method documentation
  • Kept a concise note in the example about database selection being lost on reconnection

Test Updates

  • Updated GlideClusterClient tests to use the new select() method instead of customCommand(["SELECT", "..."])
  • Added new test case select test for both RESP2 and RESP3 protocols
  • Updated existing copy with DB test to use select() method

Issue link

This Pull Request is linked to issue (URL): [#4810 ]

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Destination branch is correct - main or release
  • Create merge commit if merging release branch into main, squash otherwise.

Moves the `select()` method from GlideClient to BaseClient to make it
available for both standalone and cluster clients. Updates tests to use
the new method instead of customCommand for SELECT operations.

- Move select() method from GlideClient to BaseClient
- Move createSelect import to BaseClient
- Update GlideClusterClient tests to use select() method
- Remove outdated warning about reconnection behavior
- Simplify documentation to focus on command behavior

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
@affonsov affonsov requested a review from a team as a code owner October 2, 2025 19:51
@yipin-chen
Copy link
Copy Markdown
Collaborator

Changelog and CI errors

@yipin-chen yipin-chen mentioned this pull request Oct 2, 2025
13 tasks
Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
…ter-mode

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
…ter-mode

Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@xShinnRyuu xShinnRyuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@affonsov affonsov merged commit 2c9dac3 into release-2.1 Oct 7, 2025
34 of 35 checks passed
@affonsov affonsov deleted the node/affonsov-select-command-for-cluster-mode branch October 7, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants