Skip to content

Commit

Permalink
Allow bigint as value for int8 columns in INSERT, WHERE, etc (addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
jawj committed Jun 21, 2024
1 parent ce789b0 commit b822cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generate/pgTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') :
Expand Down

0 comments on commit b822cb8

Please sign in to comment.