Skip to main content

not_between

Function not_between 

Source
pub fn not_between<'a, V, E, L, H>(
    expr: E,
    low: L,
    high: H,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <<E::Aggregate as AggregateKind>::Or<<L as ComparisonOperand<'a, V, E>>::Aggregate> as AggregateKind>::Or<<H as ComparisonOperand<'a, V, E>>::Aggregate>, (Arg<<E as Expr<'a, V>>::Nullable, <E as ExprSources>::Sources>, (Arg<<L as ComparisonOperand<'a, V, E>>::Nullable, <L as ComparisonOperand<'a, V, E>>::Sources>, Arg<<H as ComparisonOperand<'a, V, E>>::Nullable, <H as ComparisonOperand<'a, V, E>>::Sources>))>
where V: SQLParam + 'a, E: Expr<'a, V>, L: ComparisonOperand<'a, V, E>, H: ComparisonOperand<'a, V, E>, E::SQLType: Compatible<<L as ComparisonOperand<'a, V, E>>::SQLType> + Compatible<<H as ComparisonOperand<'a, V, E>>::SQLType>,
Expand description

Negated range check (NOT BETWEEN).

Renders (expr NOT BETWEEN low AND high). See between.

ยงExamples

let minors = not_between(users.age, 18, 120);
assert_eq!(minors.sql(), r#"("users"."age" NOT BETWEEN ? AND ?)"#);