How to change to a synchronous query?
Closed this issue · 2 comments
xcg340122 commented
I want to change the query process to a synchronous operation..
Something like this:let arr = await worlds.find(function(err, results) { return results; });
dxg commented
Hey, you can do this:
const arr = await worlds.findAsync();
All callback methods have an *Async
counterpart.
See the Promises section of the readme.
xcg340122 commented
To understand the,thank you