ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
StandardAgg< T > Struct Template Reference

Base aggregator template for scalar types (int, float, bool, string). More...

Inheritance diagram for StandardAgg< T >:
Collaboration diagram for StandardAgg< T >:

Public Member Functions

AggValue finalize () const override
 Return the accumulated value, or NULL if no inputs were seen.
 
ValueType inputType () const override
 Return the value type corresponding to T.
 
- Public Member Functions inherited from Aggregator
virtual ~Aggregator ()=default
 
virtual void add (const AggValue &x)=0
 Incorporate one input value into the running aggregate.
 
virtual AggregationOperator op () const =0
 Return the aggregation operator this accumulator implements.
 
virtual ValueType resultType () const
 Return the type of the value returned by finalize().
 

Protected Attributes

value {}
 Current accumulated value.
 
bool has = false
 true once the first non-NULL input has been seen
 

Detailed Description

template<class T>
struct StandardAgg< T >

Base aggregator template for scalar types (int, float, bool, string).

Template Parameters
TThe C++ type of the accumulated value.

Definition at line 90 of file Aggregation.cpp.

Member Function Documentation

◆ finalize()

template<class T >
AggValue StandardAgg< T >::finalize ( ) const
inlineoverridevirtual

Return the accumulated value, or NULL if no inputs were seen.

Implements Aggregator.

Definition at line 97 of file Aggregation.cpp.

◆ inputType()

template<class T >
ValueType StandardAgg< T >::inputType ( ) const
inlineoverridevirtual

Return the value type corresponding to T.

Implements Aggregator.

Definition at line 101 of file Aggregation.cpp.

Member Data Documentation

◆ has

template<class T >
bool StandardAgg< T >::has = false
protected

true once the first non-NULL input has been seen

Definition at line 93 of file Aggregation.cpp.

◆ value

template<class T >
T StandardAgg< T >::value {}
protected

Current accumulated value.

Definition at line 92 of file Aggregation.cpp.


The documentation for this struct was generated from the following file: