Skip to main content

split_predicate_for_postgres

Function split_predicate_for_postgres 

Source
pub fn split_predicate_for_postgres(predicate: &Predicate) -> SplitPredicate
Expand description

Split a predicate into parts that can be pushed down to PostgreSQL vs evaluated post-fetch.

Pushdown-capable (translated to SQL):

  • Simple column comparisons (single-step paths like name = 'value')
  • JSONB path comparisons (multi-step paths like data.field = 'value')
  • AND/OR/NOT combinations of pushdown-capable predicates
  • IS NULL, TRUE, FALSE

Requires post-filtering (evaluated in Rust):

  • Future: Ref traversals, complex expressions