Wrong parameter naming in builder.js
froehr opened this issue · comments
Fabian Röhr commented
Builder.prototype._getPlaceholder = function () {
var placeholder = '';
if (this.options.namedValues) placeholder += 'p';
if (this.options.indexedValues) placeholder += this._placeholderId++;
return placeholder;
};
The code at the beginning creates the naming of parameters in prepared statements. Unfortunately it creates prameters with the pattern <valuesPrefix>p<numberOfParameter>
. PostgreSQL is not accepting this naming pattern but only<valuesPrefix><numberOfParameter>
without the p. You might want to fix that.
Artem Zhukov commented
Builder instantiated with option namedValues: false
will use proper pattern <valuesPrefix><numberOfParameter>
. I think there nothing to fix.