Skip to content

Commit 7a1b961

Browse files
committed
fix types
1 parent 2da5f44 commit 7a1b961

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/knex/src/adapter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ export class KnexAdapter<
166166
async _find(params?: ServiceParams): Promise<Paginated<Result> | Result[]>
167167
async _find(params: ServiceParams = {} as ServiceParams): Promise<Paginated<Result> | Result[]> {
168168
const { filters, paginate } = this.filterQuery(params)
169-
const { Model, name, id } = this.getOptions(params)
169+
const { name, id } = this.getOptions(params)
170170
const builder = params.knex ? params.knex.clone() : this.createQuery(params)
171-
const countBuilder = Model.count(`* as total`)
171+
const countBuilder = this.db()
172+
.count(`* as total`)
172173
.with('subquery', builder.clone().clearOrder())
173174
.from('subquery')
174175
// Handle $limit

0 commit comments

Comments
 (0)