feat(ag-grid): add SQLGlot-based SQL escaping for where and having filter clauses (#36136)

This commit is contained in:
amaannawab923
2025-11-25 13:05:40 +05:30
committed by GitHub
parent ab8352ee66
commit 186693b840
6 changed files with 402 additions and 6 deletions

View File

@@ -453,7 +453,7 @@ const buildQuery: BuildQuery<TableChartFormData> = (
];
}
// Apply AG Grid filters converted to SQL WHERE/HAVING clauses
// Apply AG Grid filters as SQL WHERE/HAVING clauses
if (ownState.sqlClauses) {
const { whereClause, havingClause } = classifySQLClauses(
ownState.sqlClauses as Record<string, string>,
@@ -462,6 +462,7 @@ const buildQuery: BuildQuery<TableChartFormData> = (
if (whereClause || havingClause) {
queryObject.extras = {
...queryObject.extras,
transpile_to_dialect: true,
...(whereClause && {
where: queryObject.extras?.where
? `${queryObject.extras.where} AND ${whereClause}`