pub struct CompiledFilter {
pub expr: BoolExpr,
pub params: Vec<DbValue>,
}Expand description
A query filter with pre-collected parameter values.
Produced by ModelBuilder::filters_by_table(). The expr is retained for
per-query SQL compilation (which depends on the provider’s dialect and the
current placeholder index), while params are collected once at
registration time to avoid redundant collect_bool_expr_values traversals
on every navigation/primary query.
For simple tenant filters (tenant_id = ?) the per-query SQL compilation
is a single to_sql call — cheap and correct for all dialects.
Fields§
§expr: BoolExprThe filter expression tree. Compiled to SQL per query using the
provider’s ISqlGenerator (placeholder syntax is dialect-specific).
params: Vec<DbValue>Parameter values extracted from the expression tree at registration time. Appended to the query’s parameter list at apply time.