sy-node-mysql
Advanced tools
Comparing version 2.0.3 to 2.0.4
{ | ||
"name": "sy-node-mysql", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=6.0" |
@@ -79,5 +79,9 @@ 'use strict'; | ||
for (const key in opts.insert) { | ||
const value = opts.insert[key]; | ||
if (value === undefined || value === null) { | ||
continue; | ||
} | ||
sql_arr.push('`' + key + '`'); | ||
values_arr.push('?'); | ||
params_arr.push(opts.insert[key]); | ||
params_arr.push(value); | ||
} | ||
@@ -91,4 +95,8 @@ sql_t = `(${sql_arr.join(',')}) values (${values_arr.join(',')}) `; | ||
for (const key in opts.onUpdate) { | ||
const value = opts.onUpdate[key]; | ||
if (value === undefined || value === null) { | ||
continue; | ||
} | ||
sql_arr.push('`' + key + '`= ?'); | ||
params_arr.push(opts.onUpdate[key]); | ||
params_arr.push(value); | ||
} | ||
@@ -95,0 +103,0 @@ sql_t = sql_arr.join(','); |
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
20683
535