Skip to content

Commit 6698457

Browse files
committed
fix(sqlite): decimal type
1 parent b45ab37 commit 6698457

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adminforth/dataConnectors/sqlite.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ class SQLiteConnector extends AdminForthBaseConnector implements IAdminForthData
2929
} else if (baseType == 'text') {
3030
field.type = AdminForthDataTypes.TEXT;
3131
field._underlineType = 'text';
32-
} else if (baseType.includes('decimal(') || baseType == 'decimal') {
32+
} else if (baseType.includes('decimal(')) {
3333
field.type = AdminForthDataTypes.DECIMAL;
3434
field._underlineType = 'decimal';
3535
const [precision, scale] = baseType.match(/\d+/g);
3636
field.precision = parseInt(precision);
3737
field.scale = parseInt(scale);
38+
} else if (baseType === 'decimal') {
39+
field.type = AdminForthDataTypes.DECIMAL;
40+
field._underlineType = 'decimal';
41+
field.precision = 10;
42+
field.scale = 2;
3843
} else if (baseType == 'real') {
3944
field.type = AdminForthDataTypes.FLOAT; //8-byte IEEE floating point number. It
4045
field._underlineType = 'real';

0 commit comments

Comments
 (0)