dresende/node-orm2

How to change to a synchronous query?

Closed this issue · 2 comments

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.

To understand the,thank you