pub fn instr<'a, V, E, S>(
expr: E,
search: S,
) -> SQLExpr<'a, V, BigInt, E::Nullable, Scalar>Expand description
INSTR - finds the position of a substring.
Returns the 1-indexed position of the first occurrence of search
in the expression, or 0 if not found. Returns BigInt.
Preserves the nullability of the input expression.
§Example
ⓘ
use drizzle_core::expr::instr;
// SELECT INSTR(users.email, '@')
let at_pos = instr(users.email, "@");