node-sql-parser
Advanced tools
Comparing version 1.9.1 to 1.9.2
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports", "./tables", "./expr", "./util", "./select"], factory); | ||
define(["exports", "./tables", "./expr", "./util", "./select", "./update"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports, require("./tables"), require("./expr"), require("./util"), require("./select")); | ||
factory(exports, require("./tables"), require("./expr"), require("./util"), require("./select"), require("./update")); | ||
} else { | ||
@@ -10,6 +10,6 @@ var mod = { | ||
}; | ||
factory(mod.exports, global.tables, global.expr, global.util, global.select); | ||
factory(mod.exports, global.tables, global.expr, global.util, global.select, global.update); | ||
global.insert = mod.exports; | ||
} | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _tables, _expr, _util, _select) { | ||
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _tables, _expr, _util, _select, _update) { | ||
"use strict"; | ||
@@ -56,4 +56,6 @@ | ||
where, | ||
on_duplicate_update: onDuplicateUpdate, | ||
partition, | ||
returning | ||
returning, | ||
set | ||
} = stmt; | ||
@@ -63,6 +65,8 @@ const clauses = ['INSERT', (0, _util.toUpper)(prefix), (0, _tables.tablesToSQL)(table), partitionToSQL(partition)]; | ||
clauses.push((0, _util.commonOptionConnector)(Array.isArray(values) ? 'VALUES' : '', valuesToSQL, values)); | ||
clauses.push((0, _util.commonOptionConnector)('SET', _update.setToSQL, set)); | ||
clauses.push((0, _util.commonOptionConnector)('WHERE', _expr.exprToSQL, where)); | ||
clauses.push((0, _util.returningToSQL)(returning)); | ||
clauses.push((0, _util.commonOptionConnector)(onDuplicateUpdate && onDuplicateUpdate.keyword, _update.setToSQL, onDuplicateUpdate && onDuplicateUpdate.set)); | ||
return clauses.filter(_util.hasVal).join(' '); | ||
} | ||
}); |
@@ -20,2 +20,3 @@ (function (global, factory) { | ||
_exports.updateToSQL = updateToSQL; | ||
_exports.setToSQL = setToSQL; | ||
@@ -22,0 +23,0 @@ /** |
{ | ||
"name": "node-sql-parser", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"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
Sorry, the diff of this file is too big to display
3518220
96709