mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
Merge pull request #83 from mingyang91/master
Fixed: duplicate JSON.parse
This commit is contained in:
commit
1c403fd107
@ -189,7 +189,9 @@ export class PostgresDriver implements Driver {
|
||||
case ColumnTypes.DATETIME:
|
||||
return moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||
case ColumnTypes.JSON:
|
||||
return JSON.stringify(value);
|
||||
// pg(pg-types) have done JSON.parse conversion
|
||||
// https://github.com/brianc/node-pg-types/blob/ed2d0e36e33217b34530727a98d20b325389e73a/lib/textParsers.js#L170
|
||||
return value;
|
||||
case ColumnTypes.SIMPLE_ARRAY:
|
||||
return (value as any[])
|
||||
.map(i => String(i))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user