How to use the MoreThanOrEqual function from typeorm

Find comprehensive JavaScript typeorm.MoreThanOrEqual code examples handpicked from public code repositorys.

22
23
24
25
26
27
28
29
30
31
try {
  if (!res.locals.user || !res.locals.user.is_admin) throw new ErrorMessage('您没有权限进行此操作。');

  let allSubmissionsCount = await JudgeState.count();
  let todaySubmissionsCount = await JudgeState.count({
    submit_time: TypeORM.MoreThanOrEqual(syzoj.utils.getCurrentDate(true))
  });
  let problemsCount = await Problem.count();
  let articlesCount = await Article.count();
  let contestsCount = await Contest.count();
fork icon219
star icon15
watch icon1

+ 15 other calls in file

31
32
33
34
35
36
37
38
39
40
})

async function clearTables(models) {
  for (const model of models) {
    await getRepository(model).delete({
      id: MoreThanOrEqual(1)
    })
    console.log('Cleared table ' + model.prototype.constructor.name)
  }
}
fork icon3
star icon9
watch icon0

+ 15 other calls in file