flora-sql-parser
Advanced tools
Comparing version 0.7.8 to 0.7.9
@@ -77,3 +77,3 @@ 'use strict'; | ||
if (operator === '!=') operator = 'NOT IN'; | ||
if (operator === 'BETWEEN') rstr = rstr[0] + ' AND ' + rstr[1]; | ||
if (operator === 'BETWEEN' || operator === 'NOT BETWEEN') rstr = rstr[0] + ' AND ' + rstr[1]; | ||
else rstr = '(' + rstr.join(', ') + ')'; | ||
@@ -257,5 +257,6 @@ } | ||
select: (expr) => { | ||
let str = selectToSQL(expr); | ||
if (expr.parentheses) str = '(' + str + ')'; | ||
return str; | ||
const str = typeof expr._next !== 'object' | ||
? selectToSQL(expr) | ||
: unionToSQL(expr); | ||
return !expr.parentheses ? str : `(${str})`; | ||
}, | ||
@@ -262,0 +263,0 @@ unary_expr: unaryToSQL |
{ | ||
"name": "flora-sql-parser", | ||
"version": "0.7.8", | ||
"version": "0.7.9", | ||
"description": "Parse SQL (select) statements into abstract syntax tree (AST) and convert ASTs back to SQL.", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "./node_modules/.bin/pegjs -o build/pegjs-parser.js sql.pegjs", | ||
"build": "./node_modules/.bin/grunt create-parser", | ||
"test": "./node_modules/.bin/grunt test", | ||
"lint": "grunt lint" | ||
"lint": "./node_modules/.bin/grunt lint" | ||
}, | ||
@@ -11,0 +11,0 @@ "keywords": [ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
282066
10341
0