You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a table created in the Dart file, which allows for coupling.
What should I do in the Drift file?
It seems that the Existing row classes in the document needs to be created first. My table is a bit complicated, so it would be a bit troublesome to manually create it.
If there are other ways, that would be even better.
Example
enumStatusEnum { open, close }
mixinWithStatusonTable {
IntColumnget status =>intEnum<StatusEnum>()();
}
classTodoItemsextendsTablewithWithStatus {
IntColumnget id =>integer().autoIncrement()();
TextColumnget title =>text()();
TextColumnget userId =>text()();
}
classTaskItemsextendsTablewithWithStatus {
IntColumnget id =>integer().autoIncrement()();
TextColumnget title =>text()();
TextColumnget userId =>text()();
}
voiddoSomething(dynamic data) {
if (data isWithStatus) {
// do something
}
}
The text was updated successfully, but these errors were encountered:
This is a table created in the
Dart
file, which allows for coupling.What should I do in the
Drift
file?It seems that the Existing row classes in the document needs to be created first. My table is a bit complicated, so it would be a bit troublesome to manually create it.
If there are other ways, that would be even better.
Example
The text was updated successfully, but these errors were encountered: