UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

21 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isAggregateFunction = exports.isRawScope = exports.isAggregateScope = void 0; const constants_1 = require("../constants"); function isAggregateScope(context) { return (context === null || context === void 0 ? void 0 : context.currentInputScope) === constants_1.OPERATION_SCOPE.AGGREGATE; } exports.isAggregateScope = isAggregateScope; function isRawScope(context) { return ((context === null || context === void 0 ? void 0 : context.currentInputScope) === undefined || (context === null || context === void 0 ? void 0 : context.currentInputScope) === constants_1.OPERATION_SCOPE.RAW); } exports.isRawScope = isRawScope; function isAggregateFunction(node) { if (!node) return false; return (node.type === constants_1.AST_TYPES.functionCall && node.functionScope === constants_1.OPERATION_SCOPE.AGGREGATE); } exports.isAggregateFunction = isAggregateFunction; //# sourceMappingURL=isAggregate.js.map