Addressing some PR comments.
This commit is contained in:
parent
cf75a8a1f3
commit
0de94d3535
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue