!async function(){
console.log(await { then(resolve, reject){ resolve(10) } })
}()
// 10
// false
!async function(){
console.log(await { then(resolve, reject){ reject(10) } })
}()
// false
// Uncaught (in promise) 10
ということは knex で .then(x => x) をわざわざ追加しなくても
console.log(await knex("table").select("*"))
でクエリが実行されるはず
やってみたら
!async function () {
const [a, b, c] = await Promise.all([1, 2, 3].map(x => knex.select(pg.raw(`${x} + 100`))))
console.log(a, b, c)
}()
// [ { '?column?': 101 } ] [ { '?column?': 102 } ] [ { '?column?': 103 } ]
うまくいった