1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Merge branch 'fix/sql-pagination-fixes' of github.com:Budibase/budibase into fix/sql-pagination-fixes

This commit is contained in:
mike12345567 2024-07-31 16:56:51 +01:00
commit 70071dac28
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 db.sql<Row>(sql, bindings)
return await tracer.trace("sqs.runSqlQuery", async span => {
span?.addTags({ sql })
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) {