mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-01 01:07:04 +02:00
Back to baseline
This commit is contained in:
parent
41e415ba0f
commit
2e6a45d1d1
|
|
@ -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)}`
|
||||
|
|
|
|||
|
|
@ -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)})`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user