strings only

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

View File

@ -80,11 +80,11 @@ function getConditionAndParams(
}
// For filters, we let TypeORM handle date conversion through parameterized queries.
let value = filter.value;
const value = filter.value;
if (dbType.startsWith('sqlite') && typeof value === 'object' && !(value instanceof Date)) {
value = JSON.stringify(value);
}
// if (dbType.startsWith('sqlite') && 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

@ -384,10 +384,12 @@ export function resolvePath(
value: DataTableColumnJsType,
path?: string,
) {
if (path) {
if (path !== undefined) {
const pathArray = parsePath(path);
if (dbType === 'postgres') {
const base = `${ref}${toPostgresPath(pathArray)}`;
return `(${base})::text`;
if (typeof value === 'number') {
return `(${base})::numeric`;
} else if (value instanceof Date) {