记录本人制作博客系统和学习knex找的相关资料链接:
1、博客系统
https://github.com/huoguozhang/my-blog/tree/master/models
2、与typescript结合,TypeScript + Express + Objection.js + Knex.js + MySQL
https://github.com/corocn/ts-server/tree/61c1e928517348f3df8c3bf8e10a6ddd0fca6cf5
包含内容:migrations
3、knex.js中文文档-查询
https://blog.songxingguo.com/2018/06/30/knex.js-query/
4、migration with knex
https://www.ctolib.com/topics-109587.html
5、Express + Knex + Objection = Painless API with DB
https://itnext.io/express-knex-objection-painless-api-with-db-74512c484f0c
Eager loading
User.query()
.where('id', id)
.eager('messages')
.then(user => {
res.json(user)
})
User.query()
.where('id', id)
.eager('[pictures, messages.comments]')
6、knex的用户登录写法
https://github.com/Bijusrt/Blog-Project/blob/master/controler/login.js
knex.select().from('blog_login').then
...
jwt.sign(userName,'athuragasiyam')
7、nest + knex 项目
https://github.com/AlxPatidar/nest-knex
这篇博客汇总了使用Knex.js进行数据库操作的资源,包括与TypeScript、Express、Objection.js结合的示例,以及如何进行查询、迁移和用户登录处理。还提到了NestJS和GraphQL-Engine项目的实践,并展示了如何实现Eager loading来优化查询性能。
17

被折叠的 条评论
为什么被折叠?



