This commit is contained in:
Kristaps Fabians Geikins
2024-09-26 16:36:11 +03:00
parent f25beb2e53
commit 5cee4f3d45
@@ -610,7 +610,7 @@ export const getModelTreeItemsTotalCountFactory =
options?: Partial<{ filterOutEmptyMain: boolean; parentModelName: string }>
) => {
const { query } = getModelTreeItemsBaseQueryFactory(deps)(projectId, options)
const q = knex.count<{ count: string }[]>().from(query.as('sq1'))
const q = deps.db().count<{ count: string }[]>().from(query.as('sq1'))
const [row] = await q
return parseInt(row.count || '0')
}