fix: remove mysql2 patch, format lua parameters

This commit is contained in:
dunak-debug committed 2021-09-12 17:56:36 +02:00
1 parent 04e03e4fef
commit f6fb7cc017
2 files changed
+9 -15

No files matched your search

-13
View File
@@ -1,13 +0,0 @@
diff --git a/node_modules/mysql2/lib/connection.js b/node_modules/mysql2/lib/connection.js
index 47970e9..c9d6bbc 100644
--- a/node_modules/mysql2/lib/connection.js
+++ b/node_modules/mysql2/lib/connection.js
@@ -519,7 +519,7 @@ class Connection extends EventEmitter {
_resolveNamedPlaceholders(options) {
let unnamed;
if (this.config.namedPlaceholders || options.namedPlaceholders) {
- if (Array.isArray(options.values)) {
+ if (/*Array.isArray(options.values)*/!options.sql.includes(':') && !options.sql.includes('@')) {
// if an array is provided as the values, assume the conversion is not necessary.
// this allows the usage of unnamed placeholders even if the namedPlaceholders flag is enabled.
return