简体   繁体   中英

returning results of multiple Sequelize queries

my endpoint needs to return the results of multiple sequelize.query() statements that use multiple tables. how do I ensure that all the statements have executed befire building the JSON?

你可以使用查询连锁.then()但使用Promise.all()可能会更好,特别是如果你有很多疑问。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM