more fixes

This commit is contained in:
Charlie Kolb 2025-10-28 13:43:57 +01:00
parent b026413f33
commit 3a46110603
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View File

@ -80,11 +80,11 @@ function getConditionAndParams(
}
// For filters, we let TypeORM handle date conversion through parameterized queries.
const value = filter.value;
let value = filter.value;
// if (dbType.startsWith('sqlite') && typeof value === 'object' && !(value instanceof Date)) {
// value = JSON.stringify(value);
// }
if (typeof value === 'object' && !(value instanceof Date)) {
value = JSON.stringify(value);
}
// Handle operators that map directly to SQL operators
const operators: Record<string, string> = {

View File

@ -403,8 +403,8 @@ export function resolvePath(
}
return `
CASE
WHEN pg_input_is_valid(${base}, ${type})
THEN ${base}::${type}
WHEN pg_input_is_valid((${base}), '${type}')
THEN (${base})::${type}
ELSE NULL
END`;
} else {