![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Provenance evaluation helper for HAVING-clause circuits. More...


Go to the source code of this file.
Functions | |
| template<typename SemiringT, typename MapT> | |
| void | provsql_having (GenericCircuit &c, gate_t g, MapT &mapping, SemiringT S=SemiringT{}) |
| Rewrite HAVING comparison gates in the circuit by enumerating possible worlds. | |
Provenance evaluation helper for HAVING-clause circuits.
When a query includes a HAVING clause, ProvSQL creates a special sub-circuit that encodes the aggregate predicate. Before the main provenance circuit can be evaluated over a semiring, these HAVING sub-circuits must first be evaluated to determine which groups pass the filter.
The single public entry point provsql_having() rewrites HAVING comparison gates in the circuit by enumerating possible worlds, for any compiled semiring. If the HAVING gate type is incompatible with the requested semiring, the function is a no-op.
Definition in file having_semantics.hpp.
| void provsql_having | ( | GenericCircuit & | c, |
| gate_t | g, | ||
| MapT & | mapping, | ||
| SemiringT | S = SemiringT{} ) |
Rewrite HAVING comparison gates in the circuit by enumerating possible worlds.
| SemiringT | The semiring type used for evaluation. |
| MapT | The provenance mapping type (gate_t → semiring value). |
| c | Circuit to rewrite. |
| g | Root gate of the sub-circuit to inspect. |
| mapping | Provenance mapping updated in place. |
| S | Semiring instance (default-constructed for stateless semirings). |
Definition at line 46 of file having_semantics.hpp.
