Skip to main content

RegexExprExt

Trait RegexExprExt 

Source
pub trait RegexExprExt<'a>: Expr<'a, PostgresValue<'a>> + Sized {
    // Provided methods
    fn regex_match(
        self,
        pattern: &'a str,
    ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
       where Self::SQLType: Textual { ... }
    fn regex_match_ci(
        self,
        pattern: &'a str,
    ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
       where Self::SQLType: Textual { ... }
    fn regex_not_match(
        self,
        pattern: &'a str,
    ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
       where Self::SQLType: Textual { ... }
    fn regex_not_match_ci(
        self,
        pattern: &'a str,
    ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
       where Self::SQLType: Textual { ... }
}
Expand description

Method forms of the regex operators, available on every PostgreSQL expression.

Each method calls the free function of the same name and has the same operand rules.

Provided Methods§

Source

fn regex_match( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
where Self::SQLType: Textual,

Tests whether self matches pattern, case-sensitively (~). See regex_match.

Source

fn regex_match_ci( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
where Self::SQLType: Textual,

Tests whether self matches pattern, ignoring case (~*). See regex_match_ci.

Source

fn regex_not_match( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
where Self::SQLType: Textual,

Tests whether self does not match pattern, case-sensitively (!~). See regex_not_match.

Source

fn regex_not_match_ci( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Self::Aggregate, Arg<Self::Nullable, Self::Sources>>
where Self::SQLType: Textual,

Tests whether self does not match pattern, ignoring case (!~*). See regex_not_match_ci.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, E: Expr<'a, PostgresValue<'a>>> RegexExprExt<'a> for E