Skip to main content

regex_not_match_ci

Function regex_not_match_ci 

Source
pub fn regex_not_match_ci<'a, E>(
    expr: E,
    pattern: &'a str,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>
where E: Expr<'a, PostgresValue<'a>>,
Expand description

PostgreSQL !~* operator - case-insensitive regex non-match.

ยงExample

let name = SQL::<PostgresValue>::raw("name");
let cond = regex_not_match_ci(name, "^admin");
assert!(cond.to_sql().sql().contains("!~*"));