Open ajmas opened 5 years ago
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
@kfirprods out of interest, what did you find that supported promises and is similar?
@kfirprods out of interest, what did you find that supported promises and is similar?
Eventually I decided to use lowdb
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.
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()