会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
4619
博客园
首页
新随笔
联系
订阅
管理
2018年6月20日
(四)sequelize postgres事务
摘要: 自动提交 手动提交 Promise.all() 如果数据是数组,要先处理之后,再放到promise.all中,嵌套多层数组,报错将获取不到 sequelize transaction
阅读全文
posted @ 2018-06-20 16:09 4619
阅读(714)
评论(0)
推荐(1)
2018年6月6日
(三)sequelize postgres增删改
摘要: build创建实例 create保存数据到数据库 Account.build({ id: Date.now(), account: '4619test', password: '4619test' }).save().then(account => { console.log(account); }
阅读全文
posted @ 2018-06-06 17:33 4619
阅读(238)
评论(0)
推荐(0)
2018年5月24日
(二)sequelize postgres查询
摘要: findById:根据id查询表数据 Executing (default): SELECT "id", "account", "password" FROM "account" AS "account" WHERE "account"."id" = 'test1'; findOne:根据条件查询表
阅读全文
posted @ 2018-05-24 15:14 4619
阅读(498)
评论(0)
推荐(0)
2018年5月8日
(一)sequelize postgres连接
摘要: npm install sequelize npm install pg
阅读全文
posted @ 2018-05-08 18:05 4619
阅读(458)
评论(0)
推荐(0)