mirror of https://github.com/AMT-Cheif/drift.git
51 lines
1.6 KiB
Dart
51 lines
1.6 KiB
Dart
// 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<int> id = GeneratedColumn<int>(
|
|
'id', aliasedName, false,
|
|
hasAutoIncrement: true,
|
|
type: DriftSqlType.int,
|
|
requiredDuringInsert: false,
|
|
defaultConstraints:
|
|
GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'));
|
|
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
|
'name', aliasedName, false,
|
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
|
@override
|
|
List<GeneratedColumn> get $columns => [id, name];
|
|
@override
|
|
String get aliasedName => _alias ?? 'users';
|
|
@override
|
|
String get actualTableName => 'users';
|
|
@override
|
|
Set<GeneratedColumn> get $primaryKey => {id};
|
|
@override
|
|
Never map(Map<String, dynamic> data, {String? tablePrefix}) {
|
|
throw UnsupportedError('TableInfo.map in schema verification code');
|
|
}
|
|
|
|
@override
|
|
Users createAlias(String alias) {
|
|
return Users(attachedDatabase, alias);
|
|
}
|
|
}
|
|
|
|
class DatabaseAtV2 extends GeneratedDatabase {
|
|
DatabaseAtV2(QueryExecutor e) : super(e);
|
|
late final Users users = Users(this);
|
|
@override
|
|
Iterable<TableInfo<Table, Object?>> get allTables =>
|
|
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
|
|
@override
|
|
List<DatabaseSchemaEntity> get allSchemaEntities => [users];
|
|
@override
|
|
int get schemaVersion => 2;
|
|
}
|