From 06e0f081c833fd3b6af31e608cbe53650873c9c8 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Tue, 3 Oct 2023 10:22:18 +0200 Subject: [PATCH] driver-adapters: support JSON columns (#4309) Fixes the "unsupported column type 141" error. --- query-engine/driver-adapters/js/adapter-neon/src/conversion.ts | 1 + query-engine/driver-adapters/js/adapter-pg/src/conversion.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/query-engine/driver-adapters/js/adapter-neon/src/conversion.ts b/query-engine/driver-adapters/js/adapter-neon/src/conversion.ts index bc9f062128b1..940c318cb439 100644 --- a/query-engine/driver-adapters/js/adapter-neon/src/conversion.ts +++ b/query-engine/driver-adapters/js/adapter-neon/src/conversion.ts @@ -30,6 +30,7 @@ export function fieldToColumnType(fieldTypeId: number): ColumnType { case NeonColumnType['NUMERIC']: case NeonColumnType['MONEY']: return ColumnTypeEnum.Numeric + case NeonColumnType['JSON']: case NeonColumnType['JSONB']: return ColumnTypeEnum.Json case NeonColumnType['UUID']: diff --git a/query-engine/driver-adapters/js/adapter-pg/src/conversion.ts b/query-engine/driver-adapters/js/adapter-pg/src/conversion.ts index f176932b08f4..79f9461ba7d6 100644 --- a/query-engine/driver-adapters/js/adapter-pg/src/conversion.ts +++ b/query-engine/driver-adapters/js/adapter-pg/src/conversion.ts @@ -30,6 +30,7 @@ export function fieldToColumnType(fieldTypeId: number): ColumnType { case PgColumnType['NUMERIC']: case PgColumnType['MONEY']: return ColumnTypeEnum.Numeric + case PgColumnType['JSON']: case PgColumnType['JSONB']: return ColumnTypeEnum.Json case PgColumnType['UUID']: