Skip to main content

eq

Function eq 

Source
pub fn eq<'a, V, L, R>(
    left: L,
    right: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <L::Aggregate as AggOr<<R as ComparisonOperand<'a, V, L>>::Aggregate>>::Output>
where V: SQLParam + 'a, L: Expr<'a, V>, R: ComparisonOperand<'a, V, L>, L::SQLType: Compatible<<R as ComparisonOperand<'a, V, L>>::SQLType>, L::Aggregate: AggOr<<R as ComparisonOperand<'a, V, L>>::Aggregate>,
Expand description

Equality comparison (=).

Requires both operands to have compatible SQL types.

ยงType Safety

// โœ… OK: Int compared with i32
eq(users.id, 10);

// โœ… OK: Int compared with BigInt (integer family)
eq(users.id, users.big_id);

// โŒ Compile error: Int cannot be compared with Text
eq(users.id, "hello");