Skip to main content

cratestack_sql/filter/
op.rs

1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
2pub enum FilterOp {
3    Eq,
4    Ne,
5    Lt,
6    Lte,
7    Gt,
8    Gte,
9    In,
10    Contains,
11    StartsWith,
12    IsNull,
13    IsNotNull,
14    /// `(col IS NULL OR col = $1)` — for the "nullable column matches
15    /// either the bound value or null" pattern that's otherwise
16    /// awkward to express via `Any([is_null, eq])` (the latter
17    /// double-binds the value when the same caller wants the null-
18    /// punning behavior elsewhere). Single-bind, single op.
19    EqOrNull,
20}