初始化

This commit is contained in:
robin
2022-08-02 19:21:03 +08:00
parent 73c1343060
commit b7e5ee5fec
27 changed files with 564 additions and 156 deletions
+40 -43
View File
@@ -1,46 +1,43 @@
//定义别名
const Sequelize = require("sequelize");
module.exports = () => {
const Op = Sequelize.Op;
//操作符别名
const operatorsAliases = {
$eq: Op.eq,
$ne: Op.ne,
$gte: Op.gte,
$gt: Op.gt,
$lte: Op.lte,
$lt: Op.lt,
$not: Op.not,
$in: Op.in,
$notIn: Op.notIn,
$is: Op.is,
$like: Op.like,
$notLike: Op.notLike,
$iLike: Op.iLike,
$notILike: Op.notILike,
$regexp: Op.regexp,
$notRegexp: Op.notRegexp,
$iRegexp: Op.iRegexp,
$notIRegexp: Op.notIRegexp,
$between: Op.between,
$notBetween: Op.notBetween,
$overlap: Op.overlap,
$contains: Op.contains,
$contained: Op.contained,
$adjacent: Op.adjacent,
$strictLeft: Op.strictLeft,
$strictRight: Op.strictRight,
$noExtendRight: Op.noExtendRight,
$noExtendLeft: Op.noExtendLeft,
$substring: Op.substring,
$startsWith: Op.startsWith,
$endsWith: Op.endsWith,
$and: Op.and,
$or: Op.or,
$any: Op.any,
$all: Op.all,
$values: Op.values,
$col: Op.col
};
return operatorsAliases
const Op = Sequelize.Op;
module.exports = {
$eq : Op.eq,
$ne : Op.ne,
$gte : Op.gte,
$gt : Op.gt,
$lte : Op.lte,
$lt : Op.lt,
$not : Op.not,
$in : Op.in,
$notIn : Op.notIn,
$is : Op.is,
$like : Op.like,
$notLike : Op.notLike,
$iLike : Op.iLike,
$notILike : Op.notILike,
$regexp : Op.regexp,
$notRegexp : Op.notRegexp,
$iRegexp : Op.iRegexp,
$notIRegexp : Op.notIRegexp,
$between : Op.between,
$notBetween : Op.notBetween,
$overlap : Op.overlap,
$contains : Op.contains,
$contained : Op.contained,
$adjacent : Op.adjacent,
$strictLeft : Op.strictLeft,
$strictRight : Op.strictRight,
$noExtendRight: Op.noExtendRight,
$noExtendLeft : Op.noExtendLeft,
$substring : Op.substring,
$startsWith : Op.startsWith,
$endsWith : Op.endsWith,
$and : Op.and,
$or : Op.or,
$any : Op.any,
$all : Op.all,
$values : Op.values,
$col : Op.col
}