Created
August 5, 2019 09:32
-
-
Save simolus3/4ebece3fe0307370564163e0b3abcff8 to your computer and use it in GitHub Desktop.
Reproduce moor dao issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:moor/moor.dart'; | |
import 'database.dart'; | |
part 'dao.g.dart'; | |
@UseDao(tables: [Users]) | |
class SomeDao extends DatabaseAccessor<Database> with _$SomeDaoMixin { | |
SomeDao(Database db) : super(db); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:moor/moor.dart'; | |
import 'dao.dart'; | |
part 'database.g.dart'; | |
class Users extends Table { | |
IntColumn get id => integer().autoIncrement()(); | |
TextColumn get name => text()(); | |
} | |
@UseMoor(tables: [Users], daos: [SomeDao]) | |
class Database extends _$Database { | |
Database(QueryExecutor e) : super(e); | |
@override | |
int get schemaVersion => 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment