From dcf7e09a46fd8b1321621b4151e9ff77c58642f4 Mon Sep 17 00:00:00 2001 From: "Visal .In" Date: Mon, 23 Dec 2024 22:53:44 +0700 Subject: [PATCH] add support for postgres json --- electron/drivers/postgres.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electron/drivers/postgres.ts b/electron/drivers/postgres.ts index c74c360..f2f1ea2 100644 --- a/electron/drivers/postgres.ts +++ b/electron/drivers/postgres.ts @@ -7,6 +7,8 @@ pg.types.setTypeParser(pg.types.builtins.TIMESTAMP, (timeStr) => timeStr); pg.types.setTypeParser(pg.types.builtins.TIMESTAMPTZ, (timeStr) => timeStr); pg.types.setTypeParser(pg.types.builtins.DATE, (timeStr) => timeStr); pg.types.setTypeParser(pg.types.builtins.TIME, (timeStr) => timeStr); +pg.types.setTypeParser(pg.types.builtins.JSON, (json) => json); +pg.types.setTypeParser(pg.types.builtins.JSONB, (json) => json); export default class PostgresDriver extends BaseDriver { protected db: pg.Pool;