Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go: Add command ZScan #2950

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Go: Add command ZScan #2950

wants to merge 1 commit into from

Conversation

tjzhang-BQ
Copy link
Collaborator

@tjzhang-BQ tjzhang-BQ commented Jan 14, 2025

Issue link

This Pull Request is linked to issue (URL): #2878

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.

Signed-off-by: TJ Zhang <[email protected]>
@tjzhang-BQ tjzhang-BQ deployed to AWS_ACTIONS January 14, 2025 04:09 — with GitHub Actions Active
@tjzhang-BQ tjzhang-BQ marked this pull request as ready for review January 14, 2025 04:09
@tjzhang-BQ tjzhang-BQ requested a review from a team as a code owner January 14, 2025 04:09
@Yury-Fridlyand Yury-Fridlyand added the go golang wrapper label Jan 14, 2025
@@ -1630,3 +1630,28 @@ func (client *baseClient) XLen(key string) (Result[int64], error) {
}
return handleLongResponse(result)
}

func (client *baseClient) ZScan(key string, cursor string) (Result[string], []Result[string], error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move docs there please

Comment on lines +24 to +29
func (zScanOptions *ZScanOptions) SetMatch(match string) *ZScanOptions {
zScanOptions.BaseScanOptions.SetMatch(match)
return zScanOptions
}

func (zScanOptions *ZScanOptions) SetCount(count int64) *ZScanOptions {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add docs to these methods

Comment on lines +1250 to +1251
fmt.Println("_____________________")
fmt.Println(resCollection)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove

if err != nil {
return CreateNilStringResult(), nil, err
}
return handleScanResponse(result)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you update please handleScanResponse to return (string, []string, error)? Those strings are never nil.
You can do it in another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go golang wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants