// GENERATED CODE, DO NOT EDIT BY HAND. // ignore_for_file: type=lint //@dart=2.12 import 'package:drift/drift.dart'; class Users extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Users(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: false, defaultValue: const Constant('name')); late final GeneratedColumn birthday = GeneratedColumn( 'birthday', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn nextUser = GeneratedColumn( 'next_user', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES users (id)')); @override List get $columns => [id, name, birthday, nextUser]; @override String get aliasedName => _alias ?? 'users'; @override String get actualTableName => 'users'; @override Set get $primaryKey => {id}; @override List> get uniqueKeys => [ {name, birthday}, ]; @override Never map(Map data, {String? tablePrefix}) { throw UnsupportedError('TableInfo.map in schema verification code'); } @override Users createAlias(String alias) { return Users(attachedDatabase, alias); } @override List get customConstraints => const ['CHECK (LENGTH(name) < 10)']; } class Groups extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Groups(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, $customConstraints: 'NOT NULL'); late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: 'NOT NULL'); late final GeneratedColumn deleted = GeneratedColumn( 'deleted', aliasedName, true, type: DriftSqlType.bool, requiredDuringInsert: false, $customConstraints: 'DEFAULT FALSE', defaultValue: const CustomExpression('FALSE')); late final GeneratedColumn owner = GeneratedColumn( 'owner', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, $customConstraints: 'NOT NULL REFERENCES users(id)'); @override List get $columns => [id, title, deleted, owner]; @override String get aliasedName => _alias ?? 'groups'; @override String get actualTableName => 'groups'; @override Set get $primaryKey => {id}; @override Never map(Map data, {String? tablePrefix}) { throw UnsupportedError('TableInfo.map in schema verification code'); } @override Groups createAlias(String alias) { return Groups(attachedDatabase, alias); } @override List get customConstraints => const ['PRIMARY KEY(id)']; @override bool get dontWriteConstraints => true; } class Notes extends Table with TableInfo, VirtualTableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Notes(this.attachedDatabase, [this._alias]); late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: ''); late final GeneratedColumn content = GeneratedColumn( 'content', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: ''); late final GeneratedColumn searchTerms = GeneratedColumn( 'search_terms', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, $customConstraints: ''); @override List get $columns => [title, content, searchTerms]; @override String get aliasedName => _alias ?? 'notes'; @override String get actualTableName => 'notes'; @override Set get $primaryKey => const {}; @override Never map(Map data, {String? tablePrefix}) { throw UnsupportedError('TableInfo.map in schema verification code'); } @override Notes createAlias(String alias) { return Notes(attachedDatabase, alias); } @override String get moduleAndArgs => 'fts5(title, content, search_terms, tokenize = "unicode61 tokenchars \'.\'")'; } class GroupCount extends ViewInfo implements HasResultSet { final String? _alias; @override final DatabaseAtV9 attachedDatabase; GroupCount(this.attachedDatabase, [this._alias]); @override List get $columns => [id, name, birthday, nextUser, groupCount]; @override String get aliasedName => _alias ?? entityName; @override String get entityName => 'group_count'; @override String get createViewStmt => 'CREATE VIEW group_count AS SELECT\n users.*,\n (SELECT COUNT(*) FROM "groups" WHERE owner = users.id) AS group_count\n FROM users;'; @override GroupCount get asDslTable => this; @override Never map(Map data, {String? tablePrefix}) { throw UnsupportedError('TableInfo.map in schema verification code'); } late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.int); late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string); late final GeneratedColumn birthday = GeneratedColumn( 'birthday', aliasedName, true, type: DriftSqlType.dateTime); late final GeneratedColumn nextUser = GeneratedColumn( 'next_user', aliasedName, true, type: DriftSqlType.int); late final GeneratedColumn groupCount = GeneratedColumn( 'group_count', aliasedName, false, type: DriftSqlType.int); @override GroupCount createAlias(String alias) { return GroupCount(attachedDatabase, alias); } @override Query? get query => null; @override Set get readTables => const {}; } class DatabaseAtV9 extends GeneratedDatabase { DatabaseAtV9(QueryExecutor e) : super(e); late final Users users = Users(this); late final Groups groups = Groups(this); late final Notes notes = Notes(this); late final GroupCount groupCount = GroupCount(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [users, groups, notes, groupCount]; @override int get schemaVersion => 9; @override DriftDatabaseOptions get options => const DriftDatabaseOptions(storeDateTimeAsText: true); }