Remove deprecated options, re-run build

This commit is contained in:
Simon Binder 2022-08-13 15:14:09 +02:00
parent a4fe582f25
commit 83c7c1ab43
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
8 changed files with 30 additions and 40 deletions

View File

@ -16,13 +16,9 @@ targets:
override_hash_and_equals_in_result_sets: true
use_column_name_as_json_key_when_defined_in_moor_file: true
generate_connect_constructor: true
compact_query_methods: true
write_from_json_string_constructor: true
raw_result_set_data: true
apply_converters_on_variables: true
generate_values_in_copy_with: true
named_parameters: true
scoped_dart_components: true
sql:
dialect: sqlite
options:
@ -43,13 +39,9 @@ targets:
override_hash_and_equals_in_result_sets: true
use_column_name_as_json_key_when_defined_in_moor_file: true
generate_connect_constructor: true
compact_query_methods: true
write_from_json_string_constructor: true
raw_result_set_data: true
apply_converters_on_variables: true
generate_values_in_copy_with: true
named_parameters: true
scoped_dart_components: true
sql:
dialect: sqlite
options:

View File

@ -305,7 +305,7 @@ targets:
moor_generator:
options:
# comment
compact_query_methods: true
scoped_dart_components: true
"moor_generator:foo":
options:
bar: baz
@ -329,7 +329,7 @@ targets:
drift_dev:
options:
# comment
compact_query_methods: true
scoped_dart_components: true
drift_dev|foo:
options:
bar: baz

View File

@ -3,9 +3,6 @@ targets:
builders:
drift_dev:
options:
compact_query_methods: true
apply_converters_on_variables: true
generate_values_in_copy_with: true
named_parameters: true
build_web_compilers:entrypoint:
generate_for:

View File

@ -62,12 +62,16 @@ class User extends DataClass implements Insertable<User> {
};
}
User copyWith({int? id, String? name, DateTime? birthday, int? nextUser}) =>
User copyWith(
{int? id,
String? name,
Value<DateTime?> birthday = const Value.absent(),
Value<int?> nextUser = const Value.absent()}) =>
User(
id: id ?? this.id,
name: name ?? this.name,
birthday: birthday ?? this.birthday,
nextUser: nextUser ?? this.nextUser,
birthday: birthday.present ? birthday.value : this.birthday,
nextUser: nextUser.present ? nextUser.value : this.nextUser,
);
@override
String toString() {
@ -303,10 +307,15 @@ class Group extends DataClass implements Insertable<Group> {
};
}
Group copyWith({int? id, String? title, bool? deleted, int? owner}) => Group(
Group copyWith(
{int? id,
String? title,
Value<bool?> deleted = const Value.absent(),
int? owner}) =>
Group(
id: id ?? this.id,
title: title ?? this.title,
deleted: deleted ?? this.deleted,
deleted: deleted.present ? deleted.value : this.deleted,
owner: owner ?? this.owner,
);
@override
@ -536,14 +545,14 @@ class GroupCountData extends DataClass {
GroupCountData copyWith(
{int? id,
String? name,
DateTime? birthday,
int? nextUser,
Value<DateTime?> birthday = const Value.absent(),
Value<int?> nextUser = const Value.absent(),
int? groupCount}) =>
GroupCountData(
id: id ?? this.id,
name: name ?? this.name,
birthday: birthday ?? this.birthday,
nextUser: nextUser ?? this.nextUser,
birthday: birthday.present ? birthday.value : this.birthday,
nextUser: nextUser.present ? nextUser.value : this.nextUser,
groupCount: groupCount ?? this.groupCount,
);
@override

View File

@ -32,9 +32,6 @@ targets:
drift_dev:
options:
generate_connect_constructor: true
compact_query_methods: true
apply_converters_on_variables: true
generate_values_in_copy_with: true
named_parameters: true
build_web_compilers:entrypoint:
generate_for:

View File

@ -1,21 +1,21 @@
targets:
$default:
builders:
# disables the SharedPartBuilder in favor of a PartBuilder from moor_generator
# disables the SharedPartBuilder in favor of a PartBuilder from drift_dev
drift_dev:
enabled: false
drift_dev|not_shared:
drift_dev:not_shared:
enabled: true
# Run built_value_generator when moor is done!
built_value_generator|built_value:
# Run built_value_generator when drift is done!
built_value_generator:built_value:
enabled: false
run_built_value:
dependencies: ['with_built_value']
builders:
# Disable all auto-applied builders from moor
# Disable all auto-applied builders from drift
drift_dev:
enabled: false
drift_dev|preparing_builder:
enabled: false
drift_dev:preparing_builder:
enabled: false

View File

@ -6,13 +6,9 @@ targets:
override_hash_and_equals_in_result_sets: true
use_column_name_as_json_key_when_defined_in_moor_file: true
generate_connect_constructor: true
compact_query_methods: true
write_from_json_string_constructor: true
raw_result_set_data: false
apply_converters_on_variables: true
generate_values_in_copy_with: true
named_parameters: false
scoped_dart_components: true
sql:
# As sqlite3 is compatible with the postgres dialect (but not vice-versa), we're
# using this dialect so that we can run the tests on postgres as well.

View File

@ -296,7 +296,7 @@ class $UsersTable extends Users with TableInfo<$UsersTable, User> {
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
Future<User> map(Map<String, dynamic> data, {String? tablePrefix}) async {
User map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return User(
id: attachedDatabase.options.types
@ -526,8 +526,7 @@ class $FriendshipsTable extends Friendships
@override
Set<GeneratedColumn> get $primaryKey => {firstUser, secondUser};
@override
Future<Friendship> map(Map<String, dynamic> data,
{String? tablePrefix}) async {
Friendship map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return Friendship(
firstUser: attachedDatabase.options.types