// GENERATED CODE, DO NOT EDIT BY HAND. //@dart=2.12 import 'package:drift/drift.dart'; class Categories extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Categories(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn color = GeneratedColumn( 'color', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); @override List get $columns => [id, name, color]; @override String get aliasedName => _alias ?? 'categories'; @override String get actualTableName => 'categories'; @override Set get $primaryKey => {id}; @override Never map(Map data, {String? tablePrefix}) { throw UnsupportedError('TableInfo.map in schema verification code'); } @override Categories createAlias(String alias) { return Categories(attachedDatabase, alias); } } class TodoEntries extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; TodoEntries(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn description = GeneratedColumn( 'description', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn category = GeneratedColumn( 'category', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); @override List get $columns => [id, description, category]; @override String get aliasedName => _alias ?? 'todo_entries'; @override String get actualTableName => 'todo_entries'; @override Set get $primaryKey => {id}; @override Never map(Map data, {String? tablePrefix}) { throw UnsupportedError('TableInfo.map in schema verification code'); } @override TodoEntries createAlias(String alias) { return TodoEntries(attachedDatabase, alias); } } class TextEntries extends Table with TableInfo, VirtualTableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; TextEntries(this.attachedDatabase, [this._alias]); late final GeneratedColumn description = GeneratedColumn( 'description', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: ''); @override List get $columns => [description]; @override String get aliasedName => _alias ?? 'text_entries'; @override String get actualTableName => 'text_entries'; @override Set get $primaryKey => const {}; @override Never map(Map data, {String? tablePrefix}) { throw UnsupportedError('TableInfo.map in schema verification code'); } @override TextEntries createAlias(String alias) { return TextEntries(attachedDatabase, alias); } @override String get moduleAndArgs => 'fts5(description, content=todo_entries, content_rowid=id)'; } class DatabaseAtV1 extends GeneratedDatabase { DatabaseAtV1(QueryExecutor e) : super(e); DatabaseAtV1.connect(DatabaseConnection c) : super.connect(c); late final Categories categories = Categories(this); late final TodoEntries todoEntries = TodoEntries(this); late final TextEntries textEntries = TextEntries(this); late final Trigger todosInsert = Trigger( 'CREATE TRIGGER todos_insert AFTER INSERT ON todo_entries BEGIN INSERT INTO text_entries ("rowid", description) VALUES (new.id, new.description);END', 'todos_insert'); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [categories, todoEntries, textEntries, todosInsert]; @override StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules( [ WritePropagation( on: TableUpdateQuery.onTableName('todo_entries', limitUpdateKind: UpdateKind.delete), result: [], ), ], ); @override int get schemaVersion => 1; }