pub fn any<ST, T>(vals: T) -> Any<T::Expression>where
T: AsArrayExpression<ST>,
๐Deprecated since 2.0.0: Use
ExpressionMethods::eq_any
insteadExpand description
Creates a PostgreSQL ANY
expression.
As with most bare functions, this is not exported by default. You can import
it specifically from diesel::pg::expression::dsl::any
, or diesel::dsl::any
.
ยงExample
let sean = (1, "Sean".to_string());
let jim = (3, "Jim".to_string());
let data = users.filter(name.eq(any(vec!["Sean", "Jim"])));
assert_eq!(Ok(vec![sean, jim]), data.load(connection));