Trait diesel::expression_methods::TextExpressionMethods [] [src]

pub trait TextExpressionMethods: Expression<SqlType = Text> + Sized {
    fn concat<T: AsExpression<Text>>(
        self,
        other: T
    ) -> Concat<Self, T::Expression> { ... }
fn like<T: AsExpression<Text>>(self, other: T) -> Like<Self, T::Expression> { ... }
fn not_like<T: AsExpression<Text>>(
        self,
        other: T
    ) -> NotLike<Self, T::Expression> { ... } }

Provided Methods

Concatenates two strings using the || operator.

Example

let names = users.select(name.concat(" the Greatest")).load(&connection);
let expected_names = vec![
    "Sean the Greatest".to_string(),
    "Tess the Greatest".to_string(),
];
assert_eq!(Ok(expected_names), names);

Returns a SQL LIKE expression

Returns a SQL NOT LIKE expression

Implementors