pg-mvc-service 2.0.11 → 2.0.12

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.
@@ -325,7 +325,7 @@ class TableModel {
325
325
  let tempVars = [...this.vars];
326
326
  const data = yield this.executeQuery(sql, tempVars);
327
327
  const countData = yield this.executeQuery(countSql, tempVars);
328
- return { datas: data.rows, count: Number(countData.rows[0].count), lastPage: Math.ceil(Number(countData.rows[0].count) / this.PageCount) };
328
+ return { datas: data.rows, total_count: Number(countData.rows[0].count), last_page: Math.ceil(Number(countData.rows[0].count) / this.PageCount) };
329
329
  });
330
330
  }
331
331
  throwException(code, type, columnName, value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -369,7 +369,7 @@ export class TableModel {
369
369
  return data.rows as Array<T>;
370
370
  }
371
371
 
372
- public async executeSelectWithCount<T = any>(): Promise<{ datas: Array<T>, count: number, lastPage: number}> {
372
+ public async executeSelectWithCount<T = any>(): Promise<{ datas: Array<T>, total_count: number, last_page: number}> {
373
373
  if (this.selectExpressions.length == 0) {
374
374
  this.select();
375
375
  }
@@ -380,7 +380,7 @@ export class TableModel {
380
380
  const data = await this.executeQuery(sql, tempVars);
381
381
 
382
382
  const countData = await this.executeQuery(countSql, tempVars);
383
- return { datas: data.rows as Array<T>, count: Number(countData.rows[0].count), lastPage: Math.ceil(Number(countData.rows[0].count) / this.PageCount)};
383
+ return { datas: data.rows as Array<T>, total_count: Number(countData.rows[0].count), last_page: Math.ceil(Number(countData.rows[0].count) / this.PageCount)};
384
384
  }
385
385
 
386
386
  protected readonly errorMessages: TOptionErrorMessage =