mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-31 16:57:08 +02:00
use double precision and brackets
This commit is contained in:
parent
37c89f2438
commit
cf81a92007
|
|
@ -390,7 +390,7 @@ export function resolvePath(
|
|||
let base = `${ref}${toPostgresPath(pathArray)}`;
|
||||
let type = 'text';
|
||||
if (typeof value === 'number') {
|
||||
type = 'numeric';
|
||||
type = 'double precision';
|
||||
} else if (value instanceof Date) {
|
||||
type = 'timestamp';
|
||||
} else if (typeof value === 'boolean') {
|
||||
|
|
@ -403,8 +403,8 @@ export function resolvePath(
|
|||
}
|
||||
|
||||
return `CASE
|
||||
WHEN json_typeof(${base.replace('->>', '->')}) = '${type}'
|
||||
THEN ${base.replace('->>', '->')}::${type}
|
||||
WHEN json_typeof((${base.replace('->>', '->')})) = '${type}'
|
||||
THEN (${base.replace('->>', '->')})::${type}
|
||||
ELSE NULL
|
||||
END`;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user