mirror of https://github.com/AMT-Cheif/drift.git
Remove legacy type inference
This commit is contained in:
parent
9025280a89
commit
5eda201749
|
@ -58,9 +58,6 @@ At the moment, moor supports these options:
|
|||
details.
|
||||
* `eagerly_load_dart_ast`: Moor's builder will load the resolved AST whenever it encounters a Dart file,
|
||||
instead of lazily when it reads a table. This is used to investigate rare builder crashes.
|
||||
* `legacy_type_inference`: Use the old type inference from moor 1 and 2. Note that `use_experimental_inference`
|
||||
is now the default and no longer exists.
|
||||
If you're using this flag, please open an issue and explain how the new inference isn't working for you, thanks!
|
||||
* `data_class_to_companions` (defaults to `true`): Controls whether moor will write the `toCompanion` method in generated
|
||||
data classes.
|
||||
* `mutable_classes` (defaults to `false`): The fields generated in generated data, companion and result set classes are final
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 4.0.0
|
||||
|
||||
- Remove the `legacy_type_inference` option
|
||||
|
||||
## 3.4.0
|
||||
|
||||
- Add experimental apis for schema verification
|
||||
|
|
|
@ -57,11 +57,6 @@ class MoorOptions {
|
|||
@JsonKey(name: 'generate_connect_constructor', defaultValue: false)
|
||||
final bool generateConnectConstructor;
|
||||
|
||||
/// Whether the old, legacy type inference engine should be used when
|
||||
/// analyzing custom sql queries.
|
||||
@JsonKey(name: 'legacy_type_inference', defaultValue: false)
|
||||
final bool legacyTypeInference;
|
||||
|
||||
@JsonKey(name: 'sqlite_modules', defaultValue: [])
|
||||
final List<SqlModule> modules;
|
||||
|
||||
|
@ -96,7 +91,6 @@ class MoorOptions {
|
|||
this.useDataClassNameForCompanions = false,
|
||||
this.useColumnNameAsJsonKeyWhenDefinedInMoorFile = false,
|
||||
this.generateConnectConstructor = false,
|
||||
this.legacyTypeInference = false,
|
||||
this.eagerlyLoadDartAst = false,
|
||||
this.dataClassToCompanions = true,
|
||||
this.generateMutableClasses = false,
|
||||
|
|
|
@ -16,7 +16,6 @@ MoorOptions _$MoorOptionsFromJson(Map<String, dynamic> json) {
|
|||
'use_data_class_name_for_companions',
|
||||
'use_column_name_as_json_key_when_defined_in_moor_file',
|
||||
'generate_connect_constructor',
|
||||
'legacy_type_inference',
|
||||
'sqlite_modules',
|
||||
'eagerly_load_dart_ast',
|
||||
'data_class_to_companions',
|
||||
|
@ -50,9 +49,6 @@ MoorOptions _$MoorOptionsFromJson(Map<String, dynamic> json) {
|
|||
generateConnectConstructor: $checkedConvert(
|
||||
json, 'generate_connect_constructor', (v) => v as bool) ??
|
||||
false,
|
||||
legacyTypeInference:
|
||||
$checkedConvert(json, 'legacy_type_inference', (v) => v as bool) ??
|
||||
false,
|
||||
eagerlyLoadDartAst:
|
||||
$checkedConvert(json, 'eagerly_load_dart_ast', (v) => v as bool) ??
|
||||
false,
|
||||
|
@ -91,7 +87,6 @@ MoorOptions _$MoorOptionsFromJson(Map<String, dynamic> json) {
|
|||
'useColumnNameAsJsonKeyWhenDefinedInMoorFile':
|
||||
'use_column_name_as_json_key_when_defined_in_moor_file',
|
||||
'generateConnectConstructor': 'generate_connect_constructor',
|
||||
'legacyTypeInference': 'legacy_type_inference',
|
||||
'eagerlyLoadDartAst': 'eagerly_load_dart_ast',
|
||||
'dataClassToCompanions': 'data_class_to_companions',
|
||||
'generateMutableClasses': 'mutable_classes',
|
||||
|
|
|
@ -44,7 +44,6 @@ class MoorSession {
|
|||
if (options.hasModule(SqlModule.json1)) const Json1Extension(),
|
||||
if (options.hasModule(SqlModule.moor_ffi)) const MoorFfiExtension(),
|
||||
],
|
||||
useLegacyTypeInference: options.legacyTypeInference,
|
||||
);
|
||||
|
||||
return SqlEngine(sqlOptions);
|
||||
|
|
Loading…
Reference in New Issue