Back to baseline

This commit is contained in:
Charlie Kolb 2025-10-28 13:18:39 +01:00
parent 41e415ba0f
commit 2e6a45d1d1
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ function getConditionAndParams(
tableReference?: string,
): [string, Record<string, unknown>] {
const paramName = `filter_${index}`;
console.log('filterValue', filter.value);
console.log('filterValue', filter.value, typeof filter.value);
const columnRef = resolvePath(
tableReference
? `${quoteIdentifier(tableReference, dbType)}.${quoteIdentifier(filter.columnName, dbType)}`

View File

@ -388,7 +388,6 @@ export function resolvePath(
const pathArray = parsePath(path);
if (dbType === 'postgres') {
const base = `${ref}${toPostgresPath(pathArray)}`;
return `(${base})::text`;
if (typeof value === 'number') {
return `(${base})::numeric`;
@ -406,6 +405,7 @@ export function resolvePath(
// difference we don't care for in the face of imminent removal of support
const path = toSQLitePath(pathArray);
const base = `json_extract(${ref}, '${path.replaceAll("'", "\\'")}')`;
if (typeof value === 'number') {
return `CAST(${base} as ${dataTableColumnTypeToSql('number', dbType)})`;
}