Mysql
 sql >> Database >  >> RDS >> Mysql

Come usare like in where condition in sequelize, node js

you can use Op operator in query
like :-

const Op = Sequelize.Op

{
  [Op.or]: [
    {
      fieldName: {
        [Op.like]: 'abc%'
      }
    },
    {
      fieldName: {
        [Op.like]: '%abc%'
      }
    }
  ]
}