Compile audience segment definitions into execution plans. Partitions filters into SQL-evaluable and predicate-evaluable phases.
Compile audience segment definitions into execution plans. Partitions filters into SQL-evaluable and predicate-evaluable phases.
(compile-segment definition)(compile-segment definition {:keys [now]})Compile a segment definition into an execution plan. Returns {:sql-clauses [...] :predicates [...] :unsupported [...]}
:unsupported holds the filters that could be turned into neither a clause
nor a predicate — today that means a date filter compiled without :now.
The shell refuses to resolve an audience that has any, rather than silently
evaluating a smaller set of filters than the definition asked for.
Accepts optional :now (java.time.LocalDate) for predicate date comparisons.
If not provided, predicates that need dates will receive :now from the filter map.
Compile a segment definition into an execution plan.
Returns {:sql-clauses [...] :predicates [...] :unsupported [...]}
`:unsupported` holds the filters that could be turned into neither a clause
nor a predicate — today that means a date filter compiled without `:now`.
The shell refuses to resolve an audience that has any, rather than silently
evaluating a smaller set of filters than the definition asked for.
Accepts optional :now (java.time.LocalDate) for predicate date comparisons.
If not provided, predicates that need dates will receive :now from the filter map.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |