@trenskow/pged 4.0.6 → 4.0.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/query-builder.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trenskow/pged",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "description": "Just a silly little db management and query builder for PostgreSQL.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/query-builder.js CHANGED
@@ -258,7 +258,7 @@ module.exports = exports = class QueryBuilder extends CustomPromise {
258
258
  let as = key.split(':');
259
259
  if (as.length == 1) return this._dbCase(as[0], quote && this._canQuote(key));
260
260
  return `${this._dbCase(as[0], quote)} as ${this._dbCase(as[1])}`;
261
- }).concat(this._paginated ? 'count(*) over() as total' : []).join(', ');
261
+ }).concat(this._paginated ? `count(${this._table}.*) over() as total` : []).join(', ');
262
262
  }
263
263
 
264
264
  get _operatorMap() {