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

Feature Request: Promise support #181

Open
ajmas opened this issue Oct 18, 2019 · 4 comments
Open

Feature Request: Promise support #181

ajmas opened this issue Oct 18, 2019 · 4 comments

Comments

@ajmas
Copy link

ajmas commented Oct 18, 2019

It would be good to have promise support added to the project.

A possible implementation would be: if callback is not passed, then return the result via a Promise.

So instead of:

MyCollection.find().limit(20, (results) => { /* ... */ });

it would be:

const results = MyCollection.find().limit(20)

At the same time it would be good to have support for Array functions, such as forEach()

@kfirprods
Copy link

Good point. This is a deal breaker for me - it's the only reason I decided to skip tingoDB.

However, the code hasn't been updated for over a year, so we shouldn't hold our hopes up

@daniel-stoneuk
Copy link

@kfirprods out of interest, what did you find that supported promises and is similar?

@kfirprods
Copy link

@kfirprods out of interest, what did you find that supported promises and is similar?

Eventually I decided to use lowdb

@daniel-stoneuk
Copy link

Cheers - looks like a decent alternative.

Shame there's nothing that's compatible with the newer mongodb drivers but this should be fine until I need a scalable database.

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

3 participants