UNPKG

@qrvey/formula-lang

Version:

QFormula support for qrvey projects

19 lines 650 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addDecimalPointIfNeeded = void 0; const constants_1 = require("../constants"); function addDecimalPointIfNeeded(value, engine) { if ([ constants_1.ENGINES.POSTGRESQL, constants_1.ENGINES.REDSHIFT, constants_1.ENGINES.SNOWFLAKE, constants_1.ENGINES.ELASTICSEARCH, ].includes(engine) && Number.isInteger(value) && !String(value).includes('.')) { return `${value}.0`; } return value; } exports.addDecimalPointIfNeeded = addDecimalPointIfNeeded; //# sourceMappingURL=addDecimalPointIfNeeded.js.map