Merge branch 'master' into fix/sql-pagination-fixes

This commit is contained in:
Michael Drury 2024-07-31 16:41:04 +01:00 committed by GitHub
commit 47401e26ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"$schema": "node_modules/lerna/schemas/lerna-schema.json", "$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "2.29.26", "version": "2.29.27",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*", "packages/*",

View File

@ -43,6 +43,7 @@ import {
} from "./filters" } from "./filters"
import { dataFilters, PROTECTED_INTERNAL_COLUMNS } from "@budibase/shared-core" import { dataFilters, PROTECTED_INTERNAL_COLUMNS } from "@budibase/shared-core"
import { isSearchingByRowID } from "./utils" import { isSearchingByRowID } from "./utils"
import tracer from "dd-trace"
const builder = new sql.Sql(SqlClient.SQL_LITE) const builder = new sql.Sql(SqlClient.SQL_LITE)
const SQLITE_COLUMN_LIMIT = 2000 const SQLITE_COLUMN_LIMIT = 2000
@ -232,7 +233,11 @@ async function runSqlQuery(
} }
const db = context.getAppDB() const db = context.getAppDB()
return await tracer.trace("sqs.runSqlQuery", async span => {
span?.addTags({ sql })
return await db.sql<Row>(sql, bindings) return await db.sql<Row>(sql, bindings)
})
} }
const response = await alias.queryWithAliasing(json, processSQLQuery) const response = await alias.queryWithAliasing(json, processSQLQuery)
if (opts?.countTotalRows) { if (opts?.countTotalRows) {