admin管理员组文章数量:1335840
Following the example from here -
Post.findAll({
where: {
tags: { [Op.contains]: ['popular', 'trending'] },
},
});
How can I combine iLike
compare to it ?
For example -
I have this array of tags
- ['foo', 'bar']
so I need something like -
Post.findAll({
where: {
tags: { [Op.containsWithLike]: ['%fo%'] },
},
});
to retrieve this Post
with this tags
array because its elements are "iLike contains" to '%fo'
I rather a solution with any operator of Op
rather than any Sequelize.literal(...)
solution
本文标签: postgresqlSequlizeCombine array contains operator with iLikeStack Overflow
版权声明:本文标题:postgresql - Sequlize - Combine array contains operator with iLike - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742386190a2465079.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论