$like: '%hat', // LIKE '%hat'
$notLike: '%hat' // NOT LIKE '%hat'
$iLike: '%hat' // ILIKE '%hat' (case insensitive) (PG only)
$notILike: '%hat' // NOT ILIKE '%hat' (PG only)
我试图了解/查找有关 $like 运算符中
%
定义的信息。这是专门的postgres吗? - 它可能是通配符语法,但通常不是为此保留 *
吗?我理解它的用法是
Model.find({
where: {
$like: 'somestring'
}
})
第一印象:
它似乎不是正则表达式,也似乎与 PG 运算符(即模数)无关。任何见解将不胜感激。
最佳答案
a percent sign (%) matches any sequence of zero or more characters
例如
%hat
将匹配 that
、 aspokathat
或 hat
;引用:postgres-docs
关于sql - sequelize.js $like 运算符中的 % 符号是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50836159/