@synatic/noql
Advanced tools
@@ -127,3 +127,6 @@ const makeFilterConditionModule = require('./makeFilterCondition'); | ||
) { | ||
const varName = val.substring(1).replace(/[.-]/g, '_'); | ||
const varName = lowerCaseFist( | ||
val.substring(1).replace(/[.-]/g, '_') | ||
); | ||
inputVars[varName] = `$${val.substring(1)}`; | ||
@@ -324,1 +327,10 @@ replacePaths.push({path: path, newVal: `$$${varName}`}); | ||
} | ||
/** | ||
* | ||
* @param {string} val | ||
* @returns {string} | ||
*/ | ||
function lowerCaseFist(val) { | ||
return `${val.charAt(0).toLowerCase()}${val.substring(1)}`; | ||
} |
@@ -304,3 +304,6 @@ const makeProjectionExpressionPartModule = require('./makeProjectionExpressionPart'); | ||
} | ||
if (queryPart.type === 'timestamp') { | ||
return new Date(columnNameOrValue); | ||
} | ||
return columnNameOrValue; | ||
} |
{ | ||
"name": "@synatic/noql", | ||
"version": "2.1.13", | ||
"version": "2.1.14", | ||
"description": "Convert SQL statements to mongo queries or aggregates", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
295622
0.1%7390
0.18%