PG: Fix updating numeric array (#5251)

* PG: Fix updating numeric array

* lint
This commit is contained in:
Diamond Lewis
2018-12-18 12:11:24 -06:00
committed by GitHub
parent c762ee4b43
commit 7b3da8b744
2 changed files with 27 additions and 0 deletions

View File

@@ -1657,6 +1657,10 @@ export class PostgresStorageAdapter implements StorageAdapter {
type = 'json';
break;
}
if (typeof elt == 'number') {
type = 'numeric';
break;
}
}
updatePatterns.push(
`$${index}:name = array_to_json($${index + 1}::${type}[])::jsonb`