Package org.h2.expression.aggregate
Class AggregateDataAvg
java.lang.Object
org.h2.expression.aggregate.AggregateData
org.h2.expression.aggregate.AggregateDataAvg
Data stored while calculating an AVG aggregate.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private final TypeInfo
private BigDecimal
private double
private BigInteger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
add
(SessionLocal session, Value v) Add a value to this aggregate.(package private) Value
getValue
(SessionLocal session) Get the aggregate result.
-
Field Details
-
dataType
-
count
private long count -
doubleValue
private double doubleValue -
decimalValue
-
integerValue
-
-
Constructor Details
-
AggregateDataAvg
AggregateDataAvg(TypeInfo dataType) - Parameters:
dataType
- the data type of the computed result
-
-
Method Details
-
add
Description copied from class:AggregateData
Add a value to this aggregate.- Specified by:
add
in classAggregateData
- Parameters:
session
- the sessionv
- the value
-
getValue
Description copied from class:AggregateData
Get the aggregate result.- Specified by:
getValue
in classAggregateData
- Parameters:
session
- the session- Returns:
- the value
-