pg-mvc-service 2.0.22 → 2.0.23
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.
|
@@ -315,10 +315,12 @@ class TableModel {
|
|
|
315
315
|
}
|
|
316
316
|
this.Limit = pageCount;
|
|
317
317
|
this.Offset = (currentPage - 1) * pageCount;
|
|
318
|
+
const tempVars = [...this.vars];
|
|
318
319
|
const tempWhereExpression = [...this.whereExpressions];
|
|
319
320
|
const tempJoinConditions = [...this.joinConditions];
|
|
320
321
|
let sql = ` SELECT ${this.selectExpressions.join(",")} ${this.createSqlFromJoinWhereSortLimit}`;
|
|
321
322
|
const data = yield this.executeQuery(sql, this.vars);
|
|
323
|
+
this.vars = tempVars;
|
|
322
324
|
this.whereExpressions = tempWhereExpression;
|
|
323
325
|
this.joinConditions = tempJoinConditions;
|
|
324
326
|
let countSql = ` SELECT COUNT(*) as "count" ${this.createSqlFromJoinWhere}`;
|
package/package.json
CHANGED
package/src/models/TableModel.ts
CHANGED
|
@@ -371,13 +371,14 @@ export class TableModel {
|
|
|
371
371
|
this.Offset = (currentPage - 1) * pageCount;
|
|
372
372
|
|
|
373
373
|
|
|
374
|
+
const tempVars = [...this.vars];
|
|
374
375
|
const tempWhereExpression = [...this.whereExpressions];
|
|
375
376
|
const tempJoinConditions = [...this.joinConditions];
|
|
376
377
|
|
|
377
378
|
let sql = ` SELECT ${this.selectExpressions.join(",")} ${this.createSqlFromJoinWhereSortLimit}`;
|
|
378
379
|
const data = await this.executeQuery(sql, this.vars);
|
|
379
380
|
|
|
380
|
-
|
|
381
|
+
this.vars = tempVars;
|
|
381
382
|
this.whereExpressions = tempWhereExpression;
|
|
382
383
|
this.joinConditions = tempJoinConditions;
|
|
383
384
|
let countSql = ` SELECT COUNT(*) as "count" ${this.createSqlFromJoinWhere}`;
|