node-sql-parser
Advanced tools
Comparing version 2.0.1-beta to 2.0.2-beta
@@ -47,2 +47,3 @@ (function (global, factory) { | ||
orderby, | ||
parentheses_symbol: parentheses, | ||
top, | ||
@@ -70,4 +71,5 @@ window: windowInfo, | ||
clauses.push((0, _limit.limitToSQL)(limit)); | ||
return clauses.filter(_util.hasVal).join(' '); | ||
const sql = clauses.filter(_util.hasVal).join(' '); | ||
return parentheses ? `(${sql})` : sql; | ||
} | ||
}); |
@@ -55,9 +55,8 @@ (function (global, factory) { | ||
with: withExpr, | ||
parentheses, | ||
select, | ||
left_parenthesis: lp, | ||
right_parenthesis: rp, | ||
orderby, | ||
limit | ||
} = stmt; | ||
const result = [(0, _with.withToSql)(withExpr), lp, unionToSQL(select), rp]; // process with, orderby and limit | ||
const result = [(0, _with.withToSql)(withExpr), parentheses && '(', unionToSQL(select), parentheses && ')']; // process with, orderby and limit | ||
@@ -64,0 +63,0 @@ result.push((0, _expr.orderOrPartitionByToSQL)(orderby, 'order by')); |
{ | ||
"name": "node-sql-parser", | ||
"version": "2.0.1-beta", | ||
"version": "2.0.2-beta", | ||
"description": "simple node sql parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
4051797
112352