Skip to content

Commit

Permalink
Re-run generator
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Dec 12, 2023
1 parent b7f9c28 commit 7964782
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class PeriodicReminder extends i0.DataClass
Map<String, i0.Expression> toColumns(bool nullToAbsent) {
final map = <String, i0.Expression>{};
map['id'] = i0.Variable<int>(id);
map['frequency'] = i0.Variable<Duration>(frequency);
map['frequency'] =
i0.Variable<Duration>(frequency, const i2.DurationType());
map['reminder'] = i0.Variable<String>(reminder);
return map;
}
Expand Down
3 changes: 2 additions & 1 deletion docs/lib/snippets/modular/custom_types/table.drift.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ class PeriodicReminder extends i0.DataClass
Map<String, i0.Expression> toColumns(bool nullToAbsent) {
final map = <String, i0.Expression>{};
map['id'] = i0.Variable<int>(id);
map['frequency'] = i0.Variable<Duration>(frequency);
map['frequency'] =
i0.Variable<Duration>(frequency, const i2.DurationType());
map['reminder'] = i0.Variable<String>(reminder);
return map;
}
Expand Down
9 changes: 4 additions & 5 deletions docs/lib/snippets/modular/many_to_many/json.drift.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class ShoppingCart extends i0.DataClass
final map = <String, i0.Expression>{};
map['id'] = i0.Variable<int>(id);
{
final converter = i2.$ShoppingCartsTable.$converterentries;
map['entries'] = i0.Variable<String>(converter.toSql(entries));
map['entries'] = i0.Variable<String>(
i2.$ShoppingCartsTable.$converterentries.toSql(entries));
}
return map;
}
Expand Down Expand Up @@ -186,9 +186,8 @@ class ShoppingCartsCompanion extends i0.UpdateCompanion<i2.ShoppingCart> {
map['id'] = i0.Variable<int>(id.value);
}
if (entries.present) {
final converter = i2.$ShoppingCartsTable.$converterentries;

map['entries'] = i0.Variable<String>(converter.toSql(entries.value));
map['entries'] = i0.Variable<String>(
i2.$ShoppingCartsTable.$converterentries.toSql(entries.value));
}
return map;
}
Expand Down
9 changes: 4 additions & 5 deletions examples/app/lib/database/database.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions examples/modular/lib/src/users.drift.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class User extends i0.DataClass implements i0.Insertable<i1.User> {
map['biography'] = i0.Variable<String>(biography);
}
if (!nullToAbsent || preferences != null) {
final converter = i1.Users.$converterpreferencesn;
map['preferences'] = i0.Variable<String>(converter.toSql(preferences));
map['preferences'] = i0.Variable<String>(
i1.Users.$converterpreferencesn.toSql(preferences));
}
if (!nullToAbsent || profilePicture != null) {
map['profile_picture'] = i0.Variable<i3.Uint8List>(profilePicture);
Expand Down Expand Up @@ -291,10 +291,8 @@ class UsersCompanion extends i0.UpdateCompanion<i1.User> {
map['biography'] = i0.Variable<String>(biography.value);
}
if (preferences.present) {
final converter = i1.Users.$converterpreferencesn;

map['preferences'] =
i0.Variable<String>(converter.toSql(preferences.value));
map['preferences'] = i0.Variable<String>(
i1.Users.$converterpreferencesn.toSql(preferences.value));
}
if (profilePicture.present) {
map['profile_picture'] = i0.Variable<i3.Uint8List>(profilePicture.value);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7964782

Please sign in to comment.