mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 08:46:58 +02:00
avoid boolean outside of sqlite
This commit is contained in:
parent
2a2dd9660e
commit
2fe58635d9
|
|
@ -402,18 +402,18 @@ 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)})`;
|
||||
// }
|
||||
// if (value instanceof Date) {
|
||||
// return `CAST(${base} as ${dataTableColumnTypeToSql('date', dbType)})`;
|
||||
// }
|
||||
// if (typeof value === 'boolean') {
|
||||
// return `CAST(${base} as ${dataTableColumnTypeToSql('boolean', dbType)})`;
|
||||
// }
|
||||
// if (typeof value === 'string') {
|
||||
// return `CAST(${base} AS ${dataTableColumnTypeToSql('string', dbType)})`;
|
||||
// }
|
||||
if (typeof value === 'number') {
|
||||
return `CAST(${base} as ${dataTableColumnTypeToSql('number', dbType)})`;
|
||||
}
|
||||
if (value instanceof Date) {
|
||||
return `CAST(${base} as ${dataTableColumnTypeToSql('date', dbType)})`;
|
||||
}
|
||||
if (typeof value === 'boolean') {
|
||||
return `CAST(${base} as ${dbType.startsWith('sqlite') ? dataTableColumnTypeToSql('boolean', dbType) : 'INTEGER'})`;
|
||||
}
|
||||
if (typeof value === 'string') {
|
||||
return `CAST(${base} AS ${dataTableColumnTypeToSql('string', dbType)})`;
|
||||
}
|
||||
// return `CAST(${base} AS ${dataTableColumnTypeToSql('string', dbType)})`;
|
||||
return base;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user