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

Support for Redis SCAN command TYPE option #1279

Closed
1riggs opened this issue Jan 26, 2021 · 1 comment · Fixed by #1287 or overload-development-community/otl.gg#204
Closed

Support for Redis SCAN command TYPE option #1279

1riggs opened this issue Jan 26, 2021 · 1 comment · Fixed by #1287 or overload-development-community/otl.gg#204
Labels

Comments

@1riggs
Copy link

1riggs commented Jan 26, 2021

Redis v6.0 added an argument for the SCAN command called TYPE, Redis docs for said argument are here. Which allows the scan command to filter the returned keys based on the type of the key. While this method certainly has some gotchas it's particularly useful when attempting to fetch all available stream keys from some Redis instance.

I was hoping to be able to do something along the lines of:

const redis = new Redis(port=999, host='localhost')
redis.scan({ type: 'stream' }).then(data => { console.log(data) })
// or
const stream = redis.scanStream({ type: 'stream' })

I apologize in advance if I have simply missed this functionality in ioredis, or is from a Redis version not yet fully supported by ioredis.

luin added a commit that referenced this issue Feb 6, 2021
luin added a commit that referenced this issue Feb 6, 2021
@luin luin closed this as completed in #1287 Feb 6, 2021
luin added a commit that referenced this issue Feb 6, 2021
ioredis-robot pushed a commit that referenced this issue Feb 6, 2021
# [4.22.0](v4.21.0...v4.22.0) (2021-02-06)

### Features

* add type support for scanStream ([#1287](#1287)) ([ad8ffa0](ad8ffa0)), closes [#1279](#1279)
@ioredis-robot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced Mar 14, 2021
janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this issue Mar 1, 2024
# [4.22.0](redis/ioredis@v4.21.0...v4.22.0) (2021-02-06)

### Features

* add type support for scanStream ([#1287](redis/ioredis#1287)) ([ad8ffa0](redis/ioredis@ad8ffa0)), closes [#1279](redis/ioredis#1279)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment