pg-mvc-service 2.0.19 → 2.0.20

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.
@@ -317,6 +317,7 @@ class TableModel {
317
317
  this.Offset = (currentPage - 1) * pageCount;
318
318
  let sql = ` SELECT ${this.selectExpressions.join(",")} ${this.createSqlFromJoinWhereSortLimit}`;
319
319
  let tempVars = [...this.vars]; // 後のthis.createSqlFromJoinWhereでvarの追加をしてしまうので、上の時点でvarを決定する
320
+ this.vars = []; // ここで初期化しないと、次のクエリで途中の連番になる
320
321
  let countSql = ` SELECT COUNT(*) as "count" ${this.createSqlFromJoinWhere}`;
321
322
  const data = yield this.executeQuery(sql, tempVars);
322
323
  const countData = yield this.executeQuery(countSql, tempVars);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -372,6 +372,7 @@ export class TableModel {
372
372
 
373
373
  let sql = ` SELECT ${this.selectExpressions.join(",")} ${this.createSqlFromJoinWhereSortLimit}`;
374
374
  let tempVars = [...this.vars]; // 後のthis.createSqlFromJoinWhereでvarの追加をしてしまうので、上の時点でvarを決定する
375
+ this.vars = []; // ここで初期化しないと、次のクエリで途中の連番になる
375
376
 
376
377
  let countSql = ` SELECT COUNT(*) as "count" ${this.createSqlFromJoinWhere}`;
377
378