Skip to main content

not_ilike

Function not_ilike 

Source
pub fn not_ilike<'a, E, P>(
    expr: E,
    pattern: P,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, <<E as Expr<'a, PostgresValue<'a>>>::Aggregate as AggregateKind>::Or<<P as ComparisonOperand<'a, PostgresValue<'a>, E>>::Aggregate>, (Arg<<E as Expr<'a, PostgresValue<'a>>>::Nullable, <E as ExprSources>::Sources>, Arg<<P as ComparisonOperand<'a, PostgresValue<'a>, E>>::Nullable, <P as ComparisonOperand<'a, PostgresValue<'a>, E>>::Sources>)>
Expand description

Tests that a text expression does not match a LIKE pattern, ignoring case (NOT ILIKE).

Operand rules and NULL handling are the same as ilike.

ยงExamples

use drizzle_core::{ToSQL, expr::raw_non_null};
use drizzle_postgres::expr::not_ilike;
use drizzle_postgres::values::PostgresValue;
use drizzle_types::postgres::types::Varchar;

let email = raw_non_null::<PostgresValue, Varchar>("email");
let cond = not_ilike(email, "%@example.com");
assert_eq!(cond.to_sql().sql(), "email NOT ILIKE $1");