ILike
Case-insensitive pattern-matching comparison (left ilike right). Extends
Like (not CompOperator directly). Shorthand key: ilike. Exported from
i-like.ts as ILike.
Constructor
ILike(left: string | SqlElement, right?: string | SqlElement): ILike
new ILike(left: string | SqlElement, right?: string | SqlElement): ILike
Dual-callable, same argument shape as Like.
import { ILike, Select } from '@sqb/builder';
Select().from('customers').where(ILike('name', 'john%'));
// where name ilike 'john%'
ilike is Postgres-flavored syntax; a dialect that lacks native ILIKE can rewrite it (via a
SerializerExtension) to e.g. upper(name) like upper('john%').
Properties
Inherits every property from Like (_type, _left, _right, _symbol,
_isArray); _symbol is always 'ilike'.
Methods
Inherits .__serialize() from Like; ILike adds no methods
of its own.
Object-literal shorthand
Select().from('customers').where({ 'name ilike': 'john%' });
// where name ilike 'john%'