pub trait TrgmExpressionMethods: Expression + Sizedwhere
Self::SqlType: TrgmTextType,{
// Provided methods
fn similar_to<T>(self, other: T) -> Similar<Self, T::Expression>
where T: AsExpression<Text> { ... }
fn word_similar_to<T>(
self,
other: T,
) -> WordSimilarRight<Self, T::Expression>
where T: AsExpression<Text> { ... }
fn strict_word_similar_to<T>(
self,
other: T,
) -> StrictWordSimilarRight<Self, T::Expression>
where T: AsExpression<Text> { ... }
fn distance<T>(self, other: T) -> Distance<Self, T::Expression>
where T: AsExpression<Text> { ... }
fn word_distance<T>(
self,
other: T,
) -> WordDistanceRight<Self, T::Expression>
where T: AsExpression<Text> { ... }
fn strict_word_distance<T>(
self,
other: T,
) -> StrictWordDistanceRight<Self, T::Expression>
where T: AsExpression<Text> { ... }
}Available on crate feature
diesel only.Expand description
Extension trait for text expressions to provide pg_trgm operators.
This trait is implemented for all Diesel expressions that return Text
or Nullable<Text>.
Provided Methods§
Sourcefn similar_to<T>(self, other: T) -> Similar<Self, T::Expression>where
T: AsExpression<Text>,
fn similar_to<T>(self, other: T) -> Similar<Self, T::Expression>where
T: AsExpression<Text>,
Sourcefn word_similar_to<T>(self, other: T) -> WordSimilarRight<Self, T::Expression>where
T: AsExpression<Text>,
fn word_similar_to<T>(self, other: T) -> WordSimilarRight<Self, T::Expression>where
T: AsExpression<Text>,
Checks if this expression contains a word similar to the given text.
Uses the %> operator.
Sourcefn strict_word_similar_to<T>(
self,
other: T,
) -> StrictWordSimilarRight<Self, T::Expression>where
T: AsExpression<Text>,
fn strict_word_similar_to<T>(
self,
other: T,
) -> StrictWordSimilarRight<Self, T::Expression>where
T: AsExpression<Text>,
Checks if this expression contains a word strictly similar to the given text.
Uses the %>> operator with strict word boundaries.
Sourcefn distance<T>(self, other: T) -> Distance<Self, T::Expression>where
T: AsExpression<Text>,
fn distance<T>(self, other: T) -> Distance<Self, T::Expression>where
T: AsExpression<Text>,
Sourcefn word_distance<T>(self, other: T) -> WordDistanceRight<Self, T::Expression>where
T: AsExpression<Text>,
fn word_distance<T>(self, other: T) -> WordDistanceRight<Self, T::Expression>where
T: AsExpression<Text>,
Returns the word similarity distance.
Uses the <->> operator.
Sourcefn strict_word_distance<T>(
self,
other: T,
) -> StrictWordDistanceRight<Self, T::Expression>where
T: AsExpression<Text>,
fn strict_word_distance<T>(
self,
other: T,
) -> StrictWordDistanceRight<Self, T::Expression>where
T: AsExpression<Text>,
Returns the strict word similarity distance.
Uses the <->>> operator.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.