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