@dwtechs/antity-pgsql 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -254,13 +254,15 @@ function $i(qty, start) {
254
254
  class Insert {
255
255
  constructor() {
256
256
  this._props = [];
257
+ this._quotedProps = [];
257
258
  this._nbProps = 0;
258
259
  this._cols = "";
259
260
  }
260
261
  addProp(prop) {
261
- this._props.push(quoteIfUppercase(prop));
262
+ this._props.push(prop);
263
+ this._quotedProps.push(quoteIfUppercase(prop));
262
264
  this._nbProps++;
263
- this._cols = this._props.join(", ");
265
+ this._cols = this._quotedProps.join(", ");
264
266
  }
265
267
  query(table, rows, consumerId, consumerName, rtn = "") {
266
268
  const propsToUse = [...this._props];
@@ -269,7 +271,7 @@ class Insert {
269
271
  if (consumerId !== undefined && consumerName !== undefined) {
270
272
  propsToUse.push("consumerId", "consumerName");
271
273
  nbProps += 2;
272
- cols += ", consumerId, consumerName";
274
+ cols += `, "consumerId", "consumerName"`;
273
275
  }
274
276
  let query = `INSERT INTO ${quoteIfUppercase(table)} (${cols}) VALUES `;
275
277
  const args = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dwtechs/antity-pgsql",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Open source library to add PostgreSQL support to @dwtechs/Antity entities.",
5
5
  "keywords": [
6
6
  "entities"