Parse the raw SQL text of a partial-index predicate. Returns `None` if the text cannot be parsed — callers should treat an unparsable predicate as a bug in the stored catalog entry, not as a pass-through (defaulting to "index everything" would silently over-populate a partial index). The caller is expected to surface a clear error; the DDL path already validates the text at CREATE INDEX time.
(text: &str)
| 37 | /// expected to surface a clear error; the DDL path already |
| 38 | /// validates the text at CREATE INDEX time. |
| 39 | pub fn parse(text: &str) -> Option<Self> { |
| 40 | let (expr, _deps) = expr_parse::parse_generated_expr(text).ok()?; |
| 41 | Some(Self { expr }) |
| 42 | } |
| 43 | |
| 44 | /// Evaluate the predicate against a document value. Returns `true` |
| 45 | /// only when the expression evaluates to `Bool(true)` — `NULL`, |
no test coverage detected