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

Aggregator implementing CHOOSE (returns the first non-NULL input). More...

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

Public Member Functions

void add (const AggValue &x) override
 Incorporate one input value into the running aggregate.
 
AggregationOperator op () const override
 Return the aggregation operator this accumulator implements.
 
- Public Member Functions inherited from StandardAgg< T >
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 ValueType resultType () const
 Return the type of the value returned by finalize().
 

Additional Inherited Members

- Protected Attributes inherited from StandardAgg< T >
value {}
 Current accumulated value.
 
bool has = false
 true once the first non-NULL input has been seen
 

Detailed Description

template<class T>
struct ChooseAgg< T >

Aggregator implementing CHOOSE (returns the first non-NULL input).

Definition at line 210 of file Aggregation.cpp.

Member Function Documentation

◆ add()

template<class T >
void ChooseAgg< T >::add ( const AggValue x)
inlineoverridevirtual

Incorporate one input value into the running aggregate.

Parameters
xInput value to add.

Implements Aggregator.

Definition at line 214 of file Aggregation.cpp.

Here is the call graph for this function:

◆ op()

template<class T >
AggregationOperator ChooseAgg< T >::op ( ) const
inlineoverridevirtual

Return the aggregation operator this accumulator implements.

Returns
The AggregationOperator enum value for this accumulator.

Implements Aggregator.

Definition at line 220 of file Aggregation.cpp.


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