pqb 0.2.6 → 0.2.8

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.
package/dist/index.js CHANGED
@@ -2760,20 +2760,20 @@ const pushUpdateSql = (ctx, model, query, quotedAs) => {
2760
2760
  ctx.sql.push(`AS ${quotedAs}`);
2761
2761
  }
2762
2762
  ctx.sql.push("SET");
2763
+ const set = [];
2763
2764
  query.data.forEach((item) => {
2764
2765
  if (isRaw(item)) {
2765
- ctx.sql.push(getRaw(item, ctx.values));
2766
+ set.push(getRaw(item, ctx.values));
2766
2767
  } else {
2767
- const set = [];
2768
2768
  for (const key in item) {
2769
2769
  const value = item[key];
2770
2770
  if (value !== void 0) {
2771
2771
  set.push(`${q(key)} = ${processValue(ctx.values, key, value)}`);
2772
2772
  }
2773
2773
  }
2774
- ctx.sql.push(set.join(", "));
2775
2774
  }
2776
2775
  });
2776
+ ctx.sql.push(set.join(", "));
2777
2777
  pushWhereStatementSql(ctx, model, query, quotedAs);
2778
2778
  pushReturningSql(ctx, model, query, quotedAs);
2779
2779
  };
@@ -3252,10 +3252,10 @@ class QueryGet {
3252
3252
 
3253
3253
  const queryMethodByReturnType = {
3254
3254
  all: "query",
3255
- one: "query",
3256
- oneOrThrow: "query",
3257
3255
  rows: "arrays",
3258
3256
  pluck: "arrays",
3257
+ one: "query",
3258
+ oneOrThrow: "query",
3259
3259
  value: "arrays",
3260
3260
  valueOrThrow: "arrays",
3261
3261
  rowCount: "arrays",