pub fn array_contains<'a, L, R>(
left: L,
right: R,
) -> SQLExpr<'a, PostgresValue<'a>, Boolean, NonNull, Scalar>Expand description
PostgreSQL @> operator - array contains.
Returns true if the left array contains all elements of the right array.
ยงExample
let tags = SQL::<PostgresValue>::raw("tags");
let condition = array_contains(tags, "rust");
assert!(condition.to_sql().sql().contains("@>"));
// Generates: tags @> $1