Skip to main content

like

like(column: string, param: Param)

import { OP, Param } from 'mysql2-orm';

/**
* { condition: '`email` LIKE ?', params: ['%gmail.com'] }
*/
OP.like('email', '%gmail.com');

/**
* { condition: '`email` LIKE ?', params: ['john@%'] }
*/
OP.like('email', 'john@%');

/**
* { condition: '`email` LIKE ?', params: ['%gmail%'] }
*/
OP.like('email', '%gmail%');