
typeorm
一Ⅱ彡
这个作者很懒,什么都没留下…
展开
-
typeorm事务
官网示例import { getManager } from "typeorm";await getManager().transaction(async transactionalEntityManager => { await transactionalEntityManager.save(users); await transactionalEntityManager.save(photos); // ...});应用await getManager().transac原创 2021-12-14 14:42:22 · 1833 阅读 · 0 评论 -
typeorm-统计数据,格式化时间
统计数据.count()获取统计数据 async getSignInCount(userId: number) { let totalCountValue = await this.signInModel.count({ where: { userId: userId, isDeleted: 0 } }) let annualCountValue = await getRepository(SignInModel)原创 2021-05-20 16:31:14 · 4240 阅读 · 0 评论