Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
see https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/306
for mysql2 compatibility, permits the use of question mark parameters even when setting `namedPlaceholders` option.
example :
await conn.query('CREATE TABLE namedPlaceholders1(t varchar(128))'); |
await conn.query("INSERT INTO `namedPlaceholders1` value ('a'), ('b'), ('c')"); |
|
// permit use of placeholder |
let res = await conn.query('select * from `namedPlaceholders1` where t IN (:possible)', { possible: ['a', 'c'] }); |
|
// but standard question mark queries still works |
res = await conn.query('select * from `namedPlaceholders1` where t IN (?)', [['b', 'c']]); |