knex-paginate
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -7,2 +7,8 @@ ### Changelog | ||
#### [v1.2.3](https://github.com/felixmosh/knex-paginate/compare/v1.2.2...v1.2.3) | ||
> 28 July 2020 | ||
- bug-fix: handle both cases of total columns (upper && lower). [`43923c8`](https://github.com/felixmosh/knex-paginate/commit/43923c863379790682c5db1a45058c91fb1973c8) | ||
#### [v1.2.2](https://github.com/felixmosh/knex-paginate/compare/v1.2.1...v1.2.2) | ||
@@ -14,2 +20,3 @@ | ||
- Add release-it [`84667e1`](https://github.com/felixmosh/knex-paginate/commit/84667e19272b30aec0a2a27741edef382c31578a) | ||
- Release 1.2.2 [`9e3ef9d`](https://github.com/felixmosh/knex-paginate/commit/9e3ef9dbbfd0e95469e3682a16f666395c1ae619) | ||
@@ -16,0 +23,0 @@ #### [v1.2.1](https://github.com/felixmosh/knex-paginate/compare/v1.2.0...v1.2.1) |
@@ -39,3 +39,3 @@ const Knex = require('knex'); | ||
countQuery = new this.constructor(this.client) | ||
.count('* as TOTAL') | ||
.count('* as total') | ||
.from( | ||
@@ -59,3 +59,3 @@ this.clone() | ||
const countResult = await countQuery.transacting(trx); | ||
const total = +(countResult.TOTAL); | ||
const total = +(countResult.TOTAL || countResult.total); | ||
@@ -62,0 +62,0 @@ pagination = { |
{ | ||
"name": "knex-paginate", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Extension of Knex's query builder with `paginate` method that will help with your pagination tasks.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9964