Skip to content

Instantly share code, notes, and snippets.

@simolus3
Created August 5, 2019 09:32
Show Gist options
  • Save simolus3/4ebece3fe0307370564163e0b3abcff8 to your computer and use it in GitHub Desktop.
Save simolus3/4ebece3fe0307370564163e0b3abcff8 to your computer and use it in GitHub Desktop.
Reproduce moor dao issue
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);
}
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