pub fn any<'a, V, L>(
conditions: L,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, L::Nullable, L::Aggregate>where
V: SQLParam + 'a,
L: ConditionList<'a, V>,Expand description
Logical OR of every condition in a list.
The flat form of or: any((a, b, c)) renders
(a OR b OR c) instead of nesting or(a, or(b, c)). None elements are
skipped, and a list with no present element renders as FALSE — an empty
disjunction matches nothing, which fails closed rather than quietly
dropping the filter.
use drizzle_core::expr::{any, eq};
any((eq(users.role, "admin"), eq(users.role, "moderator")))
// ("users"."role" = ? OR "users"."role" = ?)