Skip to content

Commit ee3fd24

Browse files
committed
Allow unnamed placeholders even if the namedPlaceholders flag is enabled
1 parent 442d304 commit ee3fd24

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/connection.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,11 @@ class Connection extends EventEmitter {
488488
_resolveNamedPlaceholders(options) {
489489
let unnamed;
490490
if (this.config.namedPlaceholders || options.namedPlaceholders) {
491+
if (Array.isArray(options.values)) {
492+
// if an array is provided as the values, assume the conversion is not necessary.
493+
// this allows the usage of unnamed placeholders even if the namedPlaceholders flag is enabled.
494+
return
495+
}
491496
if (convertNamedPlaceholders === null) {
492497
convertNamedPlaceholders = require('named-placeholders')();
493498
}

0 commit comments

Comments
 (0)