like

Function like 

Source
pub fn like<'a, V, L, R>(
    left: L,
    pattern: R,
) -> SQLExpr<'a, V, Bool, NonNull, Scalar>
where V: SQLParam + 'a, L: Expr<'a, V>, R: Expr<'a, V>, L::SQLType: Textual, R::SQLType: Textual,
Expand description

LIKE pattern matching.

Requires both operands to be textual types (TEXT, VARCHAR).

ยงType Safety

โ“˜
// โœ… OK: Text column with text pattern
like(users.name, "%Alice%");

// โŒ Compile error: Int is not Textual
like(users.id, "%123%");