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, Scalar> { ... }
    fn regex_match_ci(
        self,
        pattern: &'a str,
    ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar> { ... }
    fn regex_not_match(
        self,
        pattern: &'a str,
    ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar> { ... }
    fn regex_not_match_ci(
        self,
        pattern: &'a str,
    ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar> { ... }
}
Expand description

Extension trait providing method-based regex operators for PostgreSQL expressions.

Provided Methods§

Source

fn regex_match( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>

Case-sensitive regex match (~ operator).

Source

fn regex_match_ci( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>

Case-insensitive regex match (~* operator).

Source

fn regex_not_match( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>

Case-sensitive regex non-match (!~ operator).

Source

fn regex_not_match_ci( self, pattern: &'a str, ) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>

Case-insensitive regex non-match (!~* operator).

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

Blanket implementation for all PostgreSQL Expr types.