From b822cb85d8d45d0c6b13467fe003eb65edfa7677 Mon Sep 17 00:00:00 2001 From: George MacKerron Date: Fri, 21 Jun 2024 17:14:07 +0100 Subject: [PATCH] Allow bigint as value for int8 columns in INSERT, WHERE, etc (addresses #172) --- src/generate/pgTypes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate/pgTypes.ts b/src/generate/pgTypes.ts index 723959f..d119bb4 100644 --- a/src/generate/pgTypes.ts +++ b/src/generate/pgTypes.ts @@ -30,7 +30,7 @@ const baseTsTypeForBasePgType = (pgType: string, enums: EnumData, context: TypeC case 'int8': warnAboutLargeNumbers(); return context === 'JSONSelectable' ? (config.customJSONParsingForLargeNumbers ? '(number | db.Int8String)' : 'number') : - context === 'Selectable' ? 'db.Int8String' : '(number | db.Int8String)'; + context === 'Selectable' ? 'db.Int8String' : '(number | db.Int8String | bigint)'; case 'numeric': warnAboutLargeNumbers(); return context === 'JSONSelectable' ? (config.customJSONParsingForLargeNumbers ? '(number | db.NumericString)' : 'number') :