make SqlDialect.booleanType non-nullable

This commit is contained in:
BananaMasterz 2023-07-21 00:11:33 +03:00
parent 65d3d13a10
commit 20a220968d
2 changed files with 4 additions and 3 deletions

View File

@ -94,6 +94,7 @@ enum SqlDialect {
/// Use sqlite's sql dialect. This is the default option and the only
/// officially supported dialect at the moment.
sqlite(
booleanType: 'INTEGER',
textType: 'TEXT',
integerType: 'INTEGER',
realType: 'REAL',
@ -127,17 +128,17 @@ enum SqlDialect {
realType: 'DOUBLE',
);
final String? booleanType;
final String booleanType;
final String textType;
final String integerType;
final String realType;
final String blobType;
const SqlDialect({
required this.booleanType,
required this.textType,
required this.integerType,
required this.realType,
required this.blobType,
this.booleanType,
});
}

View File

@ -321,7 +321,7 @@ enum DriftSqlType<T extends Object> implements _InternalDriftSqlType<T> {
// ignore: unnecessary_cast
switch (this as DriftSqlType<Object>) {
case DriftSqlType.bool:
return dialect.booleanType ?? dialect.integerType;
return dialect.booleanType;
case DriftSqlType.string:
return dialect.textType;
case DriftSqlType.bigInt: