UNPKG

@sap/odata-v4

Version:

OData V4.0 server library

53 lines (46 loc) 1.09 kB
'use strict'; /** * Compute expression. * @hideconstructor */ class ComputeExpression { constructor() { this._expression = null; this._alias = null; } /** * Returns the common expression to be computed. * @returns {Expression} the expression */ getExpression() { return this._expression; } /** * Sets the common expression to be computed. * @param {Expression} expression the expression * @returns {ComputeExpression} this compute expression * @package */ setExpression(expression) { this._expression = expression; return this; } /** * Returns the name of the computation result. * @returns {string} an identifier */ getAlias() { return this._alias; } /** * Sets the alias name. * @param {string} alias the alias name * @returns {ComputeExpression} this compute expression * @package */ setAlias(alias) { this._alias = alias; return this; } } module.exports = ComputeExpression;