Skip to main content

no_ilike_sql

Function no_ilike_sql 

Source
pub fn no_ilike_sql(expr: Expression) -> Result<Expression>
Expand description

Convert ILIKE to LOWER(x) LIKE LOWER(y).

For dialects that don’t support ILIKE (case-insensitive LIKE), this converts:

SELECT * FROM t WHERE x ILIKE '%pattern%'

To:

SELECT * FROM t WHERE LOWER(x) LIKE LOWER('%pattern%')

Reference: generator.py:no_ilike_sql()