pub fn regex_match<'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-sensitive regex match.
ยงExample
let name = SQL::<PostgresValue>::raw("name");
let cond = regex_match(name, "^[A-Z]");
assert!(cond.to_sql().sql().contains("~"));