pub struct ConnectionFilters {
pub predicate: RowPredicate,
pub pk_constraint: Option<Constraint>,
pub fully_applied: bool,
pub sql_condition: Option<SqlCondition>,
pub push_guard: Option<PushGuard>,
}Expand description
The fully-pushed-down filter + the precomputed PK constraint. The memory leaf
only evaluates predicate; pk_constraint is hoisted from the condition at
connect time (the JS recomputes it per fetch via primaryKeyConstraintFrom Filters — we hoist since the condition is fixed per connection). fully_ applied mirrors SourceInput.fullyAppliedFilters (memory-source.ts:180).
Fields§
§predicate: RowPredicate§pk_constraint: Option<Constraint>§fully_applied: bool§sql_condition: Option<SqlCondition>SQLite-only: the filter lowered to a SQL WHERE condition. The memory
backend leaves this None (it filters in-memory via predicate). When
present, the SQLite leaf emits it into the SELECT so committed rows are
SQL-filtered, and predicate narrows only the overlay (which SQL never
sees) — faithful to the JS connection.filters carrying BOTH condition
and predicate (table-source.ts:256-261).
push_guard: Option<PushGuard>Equality guard implied by predicate — feeds the ConnTable push index
(designs/205-GUARDED-PUSH-FANOUT-DESIGN.md). Populated for both backends
(unlike sql_condition), since the fan-out pruning it drives is backend-neutral.
None ⇒ the connection is unconditionally visited on every push (today’s
behavior); Some(g) ⇒ visited only when a changed row’s g.col cell hits one
of g.values. The exact predicate still runs on every candidate, so the guard
need only never under-approximate.