![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Abstract interface for an incremental aggregate accumulator. More...
#include "Aggregation.h"

Public Member Functions | |
| virtual | ~Aggregator ()=default |
| virtual void | add (const AggValue &x)=0 |
| Incorporate one input value into the running aggregate. | |
| virtual AggValue | finalize () const =0 |
| Return the final aggregate result. | |
| virtual ValueType | inputType () const =0 |
Return the type of the input values accepted by add(). | |
| virtual ValueType | resultType () const |
Return the type of the value returned by finalize(). | |
Abstract interface for an incremental aggregate accumulator.
Each concrete subclass implements one aggregation function for one input type (e.g., SUM over integers, MAX over floats). Instances are created by makeAggregator().
Definition at line 139 of file Aggregation.h.
|
virtualdefault |
|
pure virtual |
Incorporate one input value into the running aggregate.
| x | Input value to add. |
Implemented in AvgAgg< T >, ChooseAgg< T >, MaxAgg< T >, MinAgg< T >, and SumAgg< T >.
|
pure virtual |
Return the final aggregate result.
AggValue. Implemented in AvgAgg< T >, and StandardAgg< T >.
|
pure virtual |
Return the type of the input values accepted by add().
Used (via the resultType() default) to report the aggregate's result type; see makeAggregator() for the operators actually built.
Implemented in AvgAgg< T >, and StandardAgg< T >.

|
inlinevirtual |
Return the type of the value returned by finalize().
Defaults to inputType(); override when the result type differs (e.g., AVG returns FLOAT regardless of the input type).
ValueType of the value returned by finalize(). Reimplemented in AvgAgg< T >.
Definition at line 170 of file Aggregation.h.
