UNPKG

@sap/odata-v4

Version:

OData V4.0 server library

39 lines (32 loc) 887 B
'use strict'; const Transformation = require('./Transformation'); /** * Compute transformation, consisting of compute expressions. * * @extends Transformation * @hideconstructor */ class ComputeTransformation extends Transformation { constructor() { super(Transformation.TransformationKind.COMPUTE); this._expressions = []; } /** * Return the compute expressions. * @returns {ComputeExpression[]} the compute expressions */ getExpressions() { return this._expressions; } /** * Add a compute expression. * @param {ComputeExpression} expression the compute expression * @returns {ComputeTransformation} this compute transformation * @package */ addExpression(expression) { this._expressions.push(expression); return this; } } module.exports = ComputeTransformation;