// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ************************************************************************** // MoorGenerator // ************************************************************************** // ignore_for_file: unnecessary_brace_in_string_interps, unnecessary_this class SomeInt extends DataClass implements Insertable { final int id; SomeInt({@required this.id}); factory SomeInt.fromData(Map data, GeneratedDatabase db, {String prefix}) { final effectivePrefix = prefix ?? ''; final intType = db.typeSystem.forDartType(); return SomeInt( id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id']), ); } factory SomeInt.fromJson(Map json, {ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return SomeInt( id: serializer.fromJson(json['id']), ); } @override Map toJson({ValueSerializer serializer}) { serializer ??= moorRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), }; } @override SomeIntsCompanion createCompanion(bool nullToAbsent) { return SomeIntsCompanion( id: id == null && nullToAbsent ? const Value.absent() : Value(id), ); } SomeInt copyWith({int id}) => SomeInt( id: id ?? this.id, ); @override String toString() { return (StringBuffer('SomeInt(')..write('id: $id')..write(')')).toString(); } @override int get hashCode => $mrjf(id.hashCode); @override bool operator ==(dynamic other) => identical(this, other) || (other is SomeInt && other.id == this.id); } class SomeIntsCompanion extends UpdateCompanion { final Value id; const SomeIntsCompanion({ this.id = const Value.absent(), }); SomeIntsCompanion.insert({ this.id = const Value.absent(), }); SomeIntsCompanion copyWith({Value id}) { return SomeIntsCompanion( id: id ?? this.id, ); } } class $SomeIntsTable extends SomeInts with TableInfo<$SomeIntsTable, SomeInt> { final GeneratedDatabase _db; final String _alias; $SomeIntsTable(this._db, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); GeneratedIntColumn _id; @override GeneratedIntColumn get id => _id ??= _constructId(); GeneratedIntColumn _constructId() { return GeneratedIntColumn('id', $tableName, false, hasAutoIncrement: true, declaredAsPrimaryKey: true); } @override List get $columns => [id]; @override $SomeIntsTable get asDslTable => this; @override String get $tableName => _alias ?? 'some_ints'; @override final String actualTableName = 'some_ints'; @override VerificationContext validateIntegrity(SomeIntsCompanion d, {bool isInserting = false}) { final context = VerificationContext(); if (d.id.present) { context.handle(_idMeta, id.isAcceptableValue(d.id.value, _idMeta)); } return context; } @override Set get $primaryKey => {id}; @override SomeInt map(Map data, {String tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : null; return SomeInt.fromData(data, _db, prefix: effectivePrefix); } @override Map entityToSql(SomeIntsCompanion d) { final map = {}; if (d.id.present) { map['id'] = Variable(d.id.value); } return map; } @override $SomeIntsTable createAlias(String alias) { return $SomeIntsTable(_db, alias); } } abstract class _$Database extends GeneratedDatabase { _$Database(QueryExecutor e) : super(SqlTypeSystem.defaultInstance, e); $SomeIntsTable _someInts; $SomeIntsTable get someInts => _someInts ??= $SomeIntsTable(this); @override Iterable get allTables => allSchemaEntities.whereType(); @override List get allSchemaEntities => [someInts]; }