Open
Description
When the parameter names lead with an underscore, they are ignored by the system.
'use strict';
const nph = require('named-placeholders')();
let query = 'SELECT 1 + :_foo + :bar;';
let params = {'_foo': 2, 'bar': 3 };
let q = nph(query, params);
console.log(q[0]); // SELECT 1 + :_foo + ?;
console.log(q[1]); // [ 3 ]
MySQL allows for column names to lead with an underscore and Javascript allows for Object properties to lead with an underscore, so this should be supported behavior.
Metadata
Metadata
Assignees
Labels
No labels