Package org.h2.expression.aggregate
Class AggregateDataAvg
- java.lang.Object
-
- org.h2.expression.aggregate.AggregateData
-
- org.h2.expression.aggregate.AggregateDataAvg
-
final class AggregateDataAvg extends AggregateData
Data stored while calculating an AVG aggregate.
-
-
Field Summary
Fields Modifier and Type Field Description private longcountprivate TypeInfodataTypeprivate java.math.BigDecimaldecimalValueprivate doubledoubleValueprivate java.math.BigIntegerintegerValue
-
Constructor Summary
Constructors Constructor Description AggregateDataAvg(TypeInfo dataType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidadd(SessionLocal session, Value v)Add a value to this aggregate.(package private) ValuegetValue(SessionLocal session)Get the aggregate result.
-
-
-
Field Detail
-
dataType
private final TypeInfo dataType
-
count
private long count
-
doubleValue
private double doubleValue
-
decimalValue
private java.math.BigDecimal decimalValue
-
integerValue
private java.math.BigInteger integerValue
-
-
Constructor Detail
-
AggregateDataAvg
AggregateDataAvg(TypeInfo dataType)
- Parameters:
dataType- the data type of the computed result
-
-
Method Detail
-
add
void add(SessionLocal session, Value v)
Description copied from class:AggregateDataAdd a value to this aggregate.- Specified by:
addin classAggregateData- Parameters:
session- the sessionv- the value
-
getValue
Value getValue(SessionLocal session)
Description copied from class:AggregateDataGet the aggregate result.- Specified by:
getValuein classAggregateData- Parameters:
session- the session- Returns:
- the value
-
-