Macro diesel::infix_predicate [] [src]

macro_rules! infix_predicate {
    ($name:ident, $operator:expr) => { ... };
    ($name:ident, $operator:expr, $return_type:ty) => { ... };
    ($name:ident, $operator:expr, backend: $backend:ty) => { ... };
    ($name:ident, $operator:expr, $backend:ty, $return_type:ty) => { ... };
}

Useful for libraries adding support for new SQL types. Apps should never need to call this

Example

infix_predicate!(Matches, " @@ ");
infix_predicate!(Concat, " || ", TsVector);
infix_predicate!(And, " && ", TsQuery);
infix_predicate!(Or, " || ", TsQuery);
infix_predicate!(Contains, " @> ");
infix_predicate!(ContainedBy, " @> ");