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

View File

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