node-sql-parser
Advanced tools
Comparing version 1.7.8 to 1.7.9
@@ -251,5 +251,18 @@ "use strict"; | ||
function commonTypeValue(opt) { | ||
const result = []; | ||
if (!opt) return result; | ||
const { | ||
type, | ||
value | ||
} = opt; | ||
result.push(type.toUpperCase()); | ||
result.push(value.toUpperCase()); | ||
return result; | ||
} | ||
function columnRefToSQL(expr) { | ||
const { | ||
arrow, | ||
collate, | ||
column, | ||
@@ -263,3 +276,4 @@ isDual, | ||
if (table) str = `${identifierToSql(table)}.${str}`; | ||
if (arrow) str = `${str} ${arrow} '${property}'`; | ||
if (arrow) str += ` ${arrow} '${property}'`; | ||
if (collate) str += ` ${commonTypeValue(collate).join(' ')}`; | ||
return parentheses ? `(${str})` : str; | ||
@@ -277,14 +291,2 @@ } | ||
function commonTypeValue(opt) { | ||
const result = []; | ||
if (!opt) return result; | ||
const { | ||
type, | ||
value | ||
} = opt; | ||
result.push(type.toUpperCase()); | ||
result.push(value.toUpperCase()); | ||
return result; | ||
} | ||
function commentToSQL(comment) { | ||
@@ -291,0 +293,0 @@ if (!comment) return; |
{ | ||
"name": "node-sql-parser", | ||
"version": "1.7.8", | ||
"version": "1.7.9", | ||
"description": "simple node sql parser", | ||
@@ -58,3 +58,3 @@ "main": "index.js", | ||
"chai": "^4.2.0", | ||
"coveralls": "^3.0.6", | ||
"coveralls": "^3.0.9", | ||
"eslint": "^6.8.0", | ||
@@ -65,3 +65,3 @@ "eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"mocha": "^7.0.0", | ||
"mocha": "^7.1.1", | ||
"nyc": "15.0.0", | ||
@@ -68,0 +68,0 @@ "pegjs": "^0.10.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2617595
93029