From cdb4ba632da14f3213bb990822a5deb7696c9757 Mon Sep 17 00:00:00 2001 From: ik9999 Date: Thu, 31 May 2018 00:35:20 +0300 Subject: [PATCH] Do clearOrder() for countQuery --- lib/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/index.js b/lib/index.js index 1fd224d..ccd3316 100644 --- a/lib/index.js +++ b/lib/index.js @@ -188,6 +188,7 @@ class Service { (params.knex || this.db(params)) .clone() .clearSelect() + .clearOrder() .count(`${this.table}.${this.id} as total`); if (!params.knex) { this.knexify(countQuery, query); }