node-sql-parser
Advanced tools
Comparing version 4.14.0 to 4.15.0
@@ -191,2 +191,11 @@ (function (global, factory) { | ||
let str = (0, _expr.exprToSQL)(expr); | ||
const { | ||
expr_list: exprList | ||
} = column; | ||
if (exprList) { | ||
const result = [str]; | ||
const columnsStr = exprList.map(col => columnToSQL(col, isDual)).join(', '); | ||
result.push([(0, _util.toUpper)(type), type && '(', columnsStr, type && ')'].filter(_util.hasVal).join('')); | ||
return result.filter(_util.hasVal).join(' '); | ||
} | ||
if (expr.parentheses && Reflect.has(expr, 'array_index')) str = `(${str})`; | ||
@@ -210,14 +219,4 @@ if (expr.array_index && expr.type !== 'column_ref') str = `${str}[${(0, _util.literalToSQL)(expr.array_index.index)}]`; | ||
const isDual = getDual(tables); | ||
const result = []; | ||
const { | ||
expr_list: exprList, | ||
star, | ||
type | ||
} = columns; | ||
result.push(star, (0, _util.toUpper)(type)); | ||
const exprListArr = exprList || columns; | ||
const columnsStr = exprListArr.map(col => columnToSQL(col, isDual)).join(', '); | ||
result.push([type && '(', columnsStr, type && ')'].filter(_util.hasVal).join('')); | ||
return result.filter(_util.hasVal).join(' '); | ||
return columns.map(col => columnToSQL(col, isDual)).join(', '); | ||
} | ||
}); |
{ | ||
"name": "node-sql-parser", | ||
"version": "4.14.0", | ||
"version": "4.15.0", | ||
"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 not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
57131180
33745