pg-mvc-service 2.0.18 → 2.0.19
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,7 +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
|
-
let countSql = ` SELECT COUNT(*) as "count"
|
|
320
|
+
let countSql = ` SELECT COUNT(*) as "count" ${this.createSqlFromJoinWhere}`;
|
|
321
321
|
const data = yield this.executeQuery(sql, tempVars);
|
|
322
322
|
const countData = yield this.executeQuery(countSql, tempVars);
|
|
323
323
|
const totalCount = Number(countData.rows[0].count);
|
package/package.json
CHANGED
package/src/models/TableModel.ts
CHANGED
|
@@ -373,7 +373,7 @@ export class TableModel {
|
|
|
373
373
|
let sql = ` SELECT ${this.selectExpressions.join(",")} ${this.createSqlFromJoinWhereSortLimit}`;
|
|
374
374
|
let tempVars = [...this.vars]; // 後のthis.createSqlFromJoinWhereでvarの追加をしてしまうので、上の時点でvarを決定する
|
|
375
375
|
|
|
376
|
-
let countSql = ` SELECT COUNT(*) as "count"
|
|
376
|
+
let countSql = ` SELECT COUNT(*) as "count" ${this.createSqlFromJoinWhere}`;
|
|
377
377
|
|
|
378
378
|
const data = await this.executeQuery(sql, tempVars);
|
|
379
379
|
|