📅  最后修改于: 2022-03-11 14:55:19.684000             🧑  作者: Mango
const posts = await db('posts')
.join('users', 'users.id', 'posts.user_id')
.select('posts.id', 'users.username', 'posts.contents')
.where({user_id: id})