UNPKG

@salesforce/soql-model

Version:
35 lines 1.16 kB
"use strict"; /* * Copyright (c) 2020, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ Object.defineProperty(exports, "__esModule", { value: true }); exports.OrderByImpl = void 0; const soqlModelObjectImpl_1 = require("./soqlModelObjectImpl"); class OrderByImpl extends soqlModelObjectImpl_1.SoqlModelObjectImpl { constructor(orderByExpressions) { super(); this.orderByExpressions = orderByExpressions; } toSoqlSyntax(options) { let syntax = 'ORDER BY '; let first = true; if (this.orderByExpressions.length > 0) { this.orderByExpressions.forEach((orderByExpressions) => { if (!first) { syntax += ', '; } syntax += orderByExpressions.toSoqlSyntax(options); first = false; }); } else { syntax += ''; } return syntax; } } exports.OrderByImpl = OrderByImpl; //# sourceMappingURL=orderByImpl.js.map