Guarantee that the expression is true if the column is one of the specified values
(column: &str, literals: I)
| 1073 | |
| 1074 | /// Guarantee that the expression is true if the column is one of the specified values |
| 1075 | fn in_guarantee<'a, I, S>(column: &str, literals: I) -> LiteralGuarantee |
| 1076 | where |
| 1077 | I: IntoIterator<Item = S>, |
| 1078 | S: Into<ScalarValue> + 'a, |
| 1079 | { |
| 1080 | let literals: Vec<_> = literals.into_iter().map(|s| s.into()).collect(); |
| 1081 | LiteralGuarantee::new(column, Guarantee::In, literals.iter()) |
| 1082 | } |
| 1083 | |
| 1084 | /// Guarantee that the expression is true if the column is NOT any of the specified values |
| 1085 | fn not_in_guarantee<'a, I, S>(column: &str, literals: I) -> LiteralGuarantee |