Skip to content

Commit

Permalink
Fix sqs views
Browse files Browse the repository at this point in the history
  • Loading branch information
adrinr committed Dec 13, 2024
1 parent e93a207 commit 583fb75
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/server/src/sdk/app/rows/search/internal/sqs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,17 @@ async function runSqlQuery(
json.operation = Operation.COUNT
}
const processSQLQuery = async (json: EnrichedQueryJson) => {
const fields = json.resource?.fields
if (fields) {
const tableId = json.tableAliases?.[json.table._id!] ?? json.table._id!
for (const key of ["_id", "_rev", "tableId"]) {
const field = `${tableId}.${key}`
if (fields.includes(field)) {
continue
}
fields.push(field)
}
}
const query = builder._query(json, {
disableReturning: true,
})
Expand Down

0 comments on commit 583fb75

Please sign in to comment.