UNPKG

relax-orm

Version:
17 lines 562 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function parseIn(inValues, propKey, colName, binds) { var res = ''; if (!Array.isArray(inValues)) { throw new TypeError('[Op.in] opeartor have to be an Array'); } inValues.forEach(function (val, idx) { var bindKey = propKey + "$in$" + idx; binds[bindKey] = val; res += ":" + bindKey + ", "; }); res = res.slice(0, -2); return colName + " IN ( " + res + " )"; } exports.parseIn = parseIn; //# sourceMappingURL=in.parser.js.map