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

Missing support for TYPE parameter of SCAN command #1559

Closed
mvmn opened this issue Dec 13, 2020 · 2 comments
Closed

Missing support for TYPE parameter of SCAN command #1559

mvmn opened this issue Dec 13, 2020 · 2 comments
Labels
type: feature A new feature
Milestone

Comments

@mvmn
Copy link
Contributor

mvmn commented Dec 13, 2020

TYPE option in ScanArgs for SCAN command is missing.

As of version 6.0 Redis SCAN command supports TYPE argument (which is not supported for HSCAN, ZSCAN or SSCAN): https://redis.io/commands/scan#the-type-option
This option allows one to filter keys by specific key type (types are same as returned by TYPE command: string, list, set, zset, hash and stream).

However, Lettuce does not support this argument.

Notes on possible ways to implement: Supposedly an extension to ScanArgs like KeyScanArgs could be added which would include such field, or the field could be added to ScanArgs directly. The Redis connection should of course accept this type for scan(...) methods and pass it to Redis accordingly.

@mvmn mvmn added the type: feature A new feature label Dec 13, 2020
@mp911de mp911de added this to the 6.1 M1 milestone Dec 13, 2020
@mvmn
Copy link
Contributor Author

mvmn commented Dec 13, 2020

Draft PR: #1560

This does NOT include tests for new parameter, though existing tests are updated.

Please update as you see fit - I'm using Eclipse and can't make Kotlin work :-(

@mp911de
Copy link
Collaborator

mp911de commented Dec 22, 2020

Thanks a lot. We will take the PR from here. It makes sense to have a KeyScanArgs type (subclassing ScanArgs).

mp911de pushed a commit that referenced this issue Dec 22, 2020
mp911de added a commit that referenced this issue Dec 22, 2020
Revert method signature changes. Change tabs to spaces, add Javadoc and license header.

Update SCAN javadoc to reference KeyScanArgs. Add integration test.

Original pull request: #1560.
@mp911de mp911de closed this as completed Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

No branches or pull requests

2 participants