mirror of https://github.com/AMT-Cheif/drift.git
make SqlDialect.booleanType non-nullable
This commit is contained in:
parent
65d3d13a10
commit
20a220968d
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue