@sap/odata-v4
Version:
OData V4.0 server library
39 lines (32 loc) • 914 B
JavaScript
;
const Transformation = require('./Transformation');
/**
* Aggregate transformation, consisting of aggregate expressions.
*
* @extends Transformation
* @hideconstructor
*/
class AggregateTransformation extends Transformation {
constructor() {
super(Transformation.TransformationKind.AGGREGATE);
this._expressions = [];
}
/**
* Return the aggregate expressions.
* @returns {AggregateExpression[]} the aggregate expressions
*/
getExpressions() {
return this._expressions;
}
/**
* Add an aggregate expression.
* @param {AggregateExpression} expression the aggregate expression
* @returns {AggregateTransformation} this aggregate transformation
* @package
*/
addExpression(expression) {
this._expressions.push(expression);
return this;
}
}
module.exports = AggregateTransformation;