Trait diesel::expression::expression_methods::bool_expression_methods::BoolExpressionMethods [] [src]

pub trait BoolExpressionMethods: Expression<SqlType=Bool> + Sized {
    fn and<T: AsExpression<Bool>>(self, other: T) -> And<Self, T::Expression> { ... }
    fn or<T: AsExpression<Bool>>(self, other: T) -> Grouped<Or<Self, T::Expression>> { ... }
}

Provided Methods

fn and<T: AsExpression<Bool>>(self, other: T) -> And<Self, T::Expression>

Creates a SQL AND expression

fn or<T: AsExpression<Bool>>(self, other: T) -> Grouped<Or<Self, T::Expression>>

Creates a SQL OR expression

The result will be wrapped in parenthesis, so that precidence matches that of your function calls. For example, false.and(true.or(false)) will return false

Implementors