mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 14:38:50 +00:00
fix: patch mysql2, named-placeholders
This commit is contained in:
2 files changed
+74
No files matched your search
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in new issue
Block a user