Skip to content

Commit c588a13

Browse files
XUJiahuaovr
authored andcommitted
fix(schema-compiler): Add missing numeric types to ScaffoldingSchema columnType mapping
1 parent e82fbeb commit c588a13

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/cubejs-schema-compiler/src/scaffolding/ScaffoldingSchema.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,16 @@ export class ScaffoldingSchema {
387387

388388
if (['time', 'date'].find(t => type.includes(t))) {
389389
return ColumnType.Time;
390-
} else if (['int', 'dec', 'double', 'numb'].find(t => type.includes(t))) {
390+
} else if ([
391+
'int', // integer, bigint, smallint, tinyint, mediumint, uint8, uint16, uint32, uint64, uinteger, ubigint, usmallint, hugeint, byteint, etc.
392+
'dec', // decimal
393+
'double', // double, double precision
394+
'numb', // number, numeric, bignumeric
395+
'float', // float, float4, float8, float32, float64, binary_float
396+
'real', // real
397+
'serial', // serial, bigserial, smallserial
398+
'money', // money, smallmoney
399+
].find(t => type.includes(t))) {
391400
// enums are not Numbers
392401
return ColumnType.Number;
393402
} else if (['bool'].find(t => type.includes(t))) {

0 commit comments

Comments
 (0)