File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ export function inferDataType(designType: any): DataTypeAbstract | undefined {
18
18
switch ( designType ) {
19
19
case String :
20
20
return DataTypes . STRING ;
21
+ case BigInt :
22
+ return DataTypes . BIGINT ;
21
23
case Number :
22
24
return DataTypes . INTEGER ;
23
25
case Boolean :
Original file line number Diff line number Diff line change
1
+ import { expect } from 'chai' ;
2
+ import { DataType , DataTypes } from 'sequelize' ;
3
+ import { inferDataType } from '../../src/sequelize/data-type/data-type-service' ;
4
+
5
+ describe ( 'data type service' , ( ) => {
6
+ describe ( 'inferDataTypes' , ( ) => {
7
+ it ( 'correctly infers bigint data type' , ( ) => {
8
+ const test : bigint = BigInt ( 100 ) ;
9
+ const result : DataType = inferDataType ( typeof test ) ;
10
+
11
+ expect ( result ) . to . equal ( DataTypes . BIGINT ) ;
12
+ } ) ;
13
+ } ) ;
14
+ } ) ;
You can’t perform that action at this time.
0 commit comments