UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

42 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LOWER = void 0; const constants_1 = require("../constants"); const utils_1 = require("../utils"); /** * `LOWER` Returns the string give it in lower case. */ exports.LOWER = { identifier: 'LOWER', parameters: [ { identifier: 'STRING', optional: false, expectedPrimitive: constants_1.AST_PRIMITIVES.STRING, validator: [utils_1.isStringParam], }, ], transpiler: { elasticsearch, snowflake, redshift, postgresql, }, primitiveResult: constants_1.AST_PRIMITIVES.STRING, }; function elasticsearch(current) { return `${current}.toLowerCase()`; } function SQL(current) { return `LOWER(${current})`; } function snowflake(current) { return SQL(current); } function redshift(current) { return SQL(current); } function postgresql(current) { return SQL(current); } //# sourceMappingURL=lower.js.map