GroupedSourceReader Class

NReco.PivotData Class Library Documentation
GroupedSourceReader populates PivotData with pre-aggregated values provided by underlying IPivotDataSource.
Inheritance Hierarchy

SystemObject
  NReco.PivotData.InputGroupedSourceReader

Namespace:  NReco.PivotData.Input
Assembly:  NReco.PivotData.Extensions (in NReco.PivotData.Extensions.dll) Version: 1.4.2
Syntax

public class GroupedSourceReader

The GroupedSourceReader type exposes the following members.

Constructors

  NameDescription
Public methodGroupedSourceReader(ActionActionIEnumerable, FuncObject, String, Object, String)
Initializes a new instance of the GroupedSourceReader class
Public methodGroupedSourceReader(IPivotDataSource, String)
Initializes a new instance of the GroupedSourceReader class
Top
Properties

  NameDescription
Public propertyAggregatorStateComposers
Top
Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRead
Public methodReadState
Protected methodRegisterKnownAggregators
Public methodToString (Inherited from Object.)
Top
Remarks

GroupedSourceReader is useful in cases when PivotData should be loaded with already aggregated data (for example, result of SQL GROUP BY query) for further analytical processing and pivot tables generation.

By default GroupedSourceReader supports the following aggregator types:

CountAggregatorFactoryfield for this value is specified as constructor parameter
SumAggregatorFactoryby convention field name for this value is "[field]_Sum"
AverageAggregatorFactoryby convention field name for this value is "[field]_Average"
MinAggregatorFactoryby convention field name for this value is "[field]_Min"
MaxAggregatorFactoryby convention field name for this value is "[field]_Max"
To support other aggregators you need to implement GroupedSourceReaderIAggregatorStateComposer and add handler to AggregatorStateComposers collection.

See Also

Reference