Addressing some PR comments.

This commit is contained in:
mike12345567 2024-06-19 11:52:50 +01:00
parent cf75a8a1f3
commit 0de94d3535
2 changed files with 3 additions and 4 deletions

View File

@ -533,13 +533,12 @@ class InternalBuilder {
const tableName = endpoint.entityId const tableName = endpoint.entityId
const tableAlias = aliases?.[tableName] const tableAlias = aliases?.[tableName]
const query = knex( return knex(
this.tableNameWithSchema(tableName, { this.tableNameWithSchema(tableName, {
alias: tableAlias, alias: tableAlias,
schema: endpoint.schema, schema: endpoint.schema,
}) })
) )
return query
} }
create(knex: Knex, json: QueryJson, opts: QueryOptions): Knex.QueryBuilder { create(knex: Knex, json: QueryJson, opts: QueryOptions): Knex.QueryBuilder {
@ -643,7 +642,7 @@ class InternalBuilder {
tableAliases tableAliases
) )
// add a base query over all // add a base limit over the whole query
if (!counting) { if (!counting) {
query = query.limit(BASE_LIMIT) query = query.limit(BASE_LIMIT)
} }

View File

@ -106,7 +106,7 @@ function runSqlQuery(json: QueryJson, tables: Table[]): Promise<Row[]>
function runSqlQuery( function runSqlQuery(
json: QueryJson, json: QueryJson,
tables: Table[], tables: Table[],
opts: { countTotalRows: boolean } opts: { countTotalRows: true }
): Promise<number> ): Promise<number>
async function runSqlQuery( async function runSqlQuery(
json: QueryJson, json: QueryJson,