Trait diesel::pg::expression::expression_methods::PgExpressionMethods [] [src]

pub trait PgExpressionMethods: Expression + Sized {
    fn is_not_distinct_from<T>(self, other: T) -> IsNotDistinctFrom<Self, T::Expression> where T: AsExpression<Self::SqlType> { ... }
}

Provided Methods

fn is_not_distinct_from<T>(self, other: T) -> IsNotDistinctFrom<Self, T::Expression> where T: AsExpression<Self::SqlType>

Creates a PostgreSQL IS NOT DISTINCT FROM expression. This behaves identically to the = operator, except that NULL is treated as a normal value.

Example

let data = users.select(id).filter(name.is_not_distinct_from("Sean"));
assert_eq!(Ok(1), data.first(&connection));

Implementors