@synatic/sql-to-mongo
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -163,2 +163,14 @@ const makeProjectionExpressionPartModule = require('./makeProjectionExpressionPart'); | ||
if (queryPart.type === 'function' && queryPart.name === 'NOT') { | ||
return { | ||
$nor: makeQueryPart( | ||
queryPart.args, | ||
ignorePrefix, | ||
allowedTypes, | ||
includeThis, | ||
tableAlias | ||
), | ||
}; | ||
} | ||
if (queryPart.type === 'function' || queryPart.type === 'select') | ||
@@ -170,2 +182,3 @@ return makeProjectionExpressionPartModule.makeProjectionExpressionPart( | ||
); | ||
if (queryPart.type === 'expr_list') { | ||
@@ -194,2 +207,21 @@ return queryPart.value.map((v) => makeQueryPart(v)); | ||
// NOT Expression | ||
if ( | ||
queryPart.type === 'unary_expr' && | ||
queryPart.operator === 'NOT' && | ||
queryPart.expr | ||
) { | ||
const exprQuery = makeQueryPart( | ||
queryPart.expr, | ||
ignorePrefix, | ||
allowedTypes, | ||
includeThis, | ||
tableAlias | ||
); | ||
return { | ||
$nor: $check.array(exprQuery) ? exprQuery : [exprQuery], | ||
}; | ||
} | ||
// todo add not | ||
@@ -196,0 +228,0 @@ |
{ | ||
"name": "@synatic/sql-to-mongo", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Convert SQL to mongo queries or aggregates", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
211798
4489