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