Skip to main content

not_in_array

Function not_in_array 

Source
pub fn not_in_array<'a, V, E, I, R>(
    expr: E,
    values: I,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, E::Aggregate, (Arg<<E as Expr<'a, V>>::Nullable, <E as ExprSources>::Sources>, Arg<<R as ComparisonOperand<'a, V, E>>::Nullable, <R as ComparisonOperand<'a, V, E>>::Sources>)>
where V: SQLParam + 'a, E: Expr<'a, V>, I: IntoIterator<Item = R>, R: ComparisonOperand<'a, V, E>, E::SQLType: Compatible<<R as ComparisonOperand<'a, V, E>>::SQLType>,
Expand description

Non-membership in a list of values (expr NOT IN (v1, v2, ...)).

Same rules as in_array. An empty list renders TRUE.

ยงExamples

let cond = not_in_array(users.age, [0, 1, 2]);
assert_eq!(cond.sql(), r#""users"."age" NOT IN (?, ?, ?)"#);