| 1 |
/* |
| 2 |
* Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 3 |
* and the EPL 1.0 (https://h2database.com/html/license.html). |
| 4 |
* Initial Developer: H2 Group |
| 5 |
*/ |
| 6 |
package org.h2.expression.aggregate; |
| 7 |
|
| 8 |
import org.h2.engine.SessionLocal; |
| 9 |
import org.h2.value.Value; |
| 10 |
|
| 11 |
/** |
| 12 |
* Abstract class for the computation of an aggregate. |
| 13 |
*/ |
| 14 |
abstract class AggregateData { |
| 15 |
|
| 16 |
/** |
| 17 |
* Add a value to this aggregate. |
| 18 |
* |
| 19 |
* @param session the session |
| 20 |
* @param v the value |
| 21 |
*/ |
| 22 |
abstract void add(SessionLocal session, Value v); |
| 23 |
|
| 24 |
/** |
| 25 |
* Get the aggregate result. |
| 26 |
* |
| 27 |
* @param session the session |
| 28 |
* @return the value |
| 29 |
*/ |
| 30 |
abstract Value getValue(SessionLocal session); |
| 31 |
|
| 32 |
} |