Trait backend::db::function::PgTrgmExpressionMethods

source ·
pub trait PgTrgmExpressionMethods
where 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§

source

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.

Object Safety§

This trait is not object safe.

Implementors§