Trait backend::db::function::PgTrgmExpressionMethods
source · pub trait PgTrgmExpressionMethodswhere
Self: Expression + Sized,{
// Provided method
fn fuzzy<U>(self, right: U) -> PgTrgmFuzzy<Self, U::Expression>
where Self::SqlType: SqlType,
U: AsExpression<Self::SqlType> { ... }
}
Expand description
Implements pg_trgm
methods for diesel
Provided Methods§
sourcefn fuzzy<U>(self, right: U) -> PgTrgmFuzzy<Self, U::Expression>where
Self::SqlType: SqlType,
U: AsExpression<Self::SqlType>,
fn fuzzy<U>(self, right: U) -> PgTrgmFuzzy<Self, U::Expression>where Self::SqlType: SqlType, U: AsExpression<Self::SqlType>,
Fuzzy search. Uses the pg_trgm
%
operator.
The %
operator uses the pg_trgm
function similarity
in the background with a default value of 0.3
.
If you want a different value use similarity
with gt/lt
instead.