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

Could we also add a queryKeysIt() method with the QueryArgs optoins? #9

Closed
huan opened this issue Aug 15, 2019 · 2 comments
Closed

Comments

@huan
Copy link
Contributor

huan commented Aug 15, 2019

According to #1 (comment), I would like to have a queryKeysIt() so that I can get the keys by a queryArgs.

Currently, I have to get an iterator of both [key, value] and filter out the key. If we can have the queryKeysIt with a queryArgs, then I'll be able to filter out the keys I needed, and I guess that would be a huge improvement of the performance (because all the keys are in memory)?

@only-cliches
Copy link
Owner

You can already do this with array destructuring.

const data = await db.queryIt({values: false});
for await (const [key, value] of data) {
    console.log(key);
}

@huan
Copy link
Contributor Author

huan commented Aug 15, 2019

Fantastic!

Thanks for this awesome API. 😄

@huan huan closed this as completed Aug 15, 2019
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

No branches or pull requests

2 participants