// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $WolleTable extends Wolle with TableInfo<$WolleTable, WolleData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $WolleTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); static const VerificationMeta _manufactureMeta = const VerificationMeta('manufacture'); @override late final GeneratedColumn manufacture = GeneratedColumn( 'manufacture', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _titleMeta = const VerificationMeta('title'); @override late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _colorMeta = const VerificationMeta('color'); @override late final GeneratedColumn color = GeneratedColumn( 'color', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); @override List get $columns => [id, manufacture, title, color]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'wolle'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } if (data.containsKey('manufacture')) { context.handle( _manufactureMeta, manufacture.isAcceptableOrUnknown( data['manufacture']!, _manufactureMeta)); } else if (isInserting) { context.missing(_manufactureMeta); } if (data.containsKey('title')) { context.handle( _titleMeta, title.isAcceptableOrUnknown(data['title']!, _titleMeta)); } else if (isInserting) { context.missing(_titleMeta); } if (data.containsKey('color')) { context.handle( _colorMeta, color.isAcceptableOrUnknown(data['color']!, _colorMeta)); } else if (isInserting) { context.missing(_colorMeta); } return context; } @override Set get $primaryKey => {id}; @override WolleData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return WolleData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, manufacture: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}manufacture'])!, title: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}title'])!, color: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}color'])!, ); } @override $WolleTable createAlias(String alias) { return $WolleTable(attachedDatabase, alias); } } class WolleData extends DataClass implements Insertable { final int id; final String manufacture; final String title; final int color; const WolleData( {required this.id, required this.manufacture, required this.title, required this.color}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['manufacture'] = Variable(manufacture); map['title'] = Variable(title); map['color'] = Variable(color); return map; } WolleCompanion toCompanion(bool nullToAbsent) { return WolleCompanion( id: Value(id), manufacture: Value(manufacture), title: Value(title), color: Value(color), ); } factory WolleData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return WolleData( id: serializer.fromJson(json['id']), manufacture: serializer.fromJson(json['manufacture']), title: serializer.fromJson(json['title']), color: serializer.fromJson(json['color']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'manufacture': serializer.toJson(manufacture), 'title': serializer.toJson(title), 'color': serializer.toJson(color), }; } WolleData copyWith( {int? id, String? manufacture, String? title, int? color}) => WolleData( id: id ?? this.id, manufacture: manufacture ?? this.manufacture, title: title ?? this.title, color: color ?? this.color, ); @override String toString() { return (StringBuffer('WolleData(') ..write('id: $id, ') ..write('manufacture: $manufacture, ') ..write('title: $title, ') ..write('color: $color') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, manufacture, title, color); @override bool operator ==(Object other) => identical(this, other) || (other is WolleData && other.id == this.id && other.manufacture == this.manufacture && other.title == this.title && other.color == this.color); } class WolleCompanion extends UpdateCompanion { final Value id; final Value manufacture; final Value title; final Value color; const WolleCompanion({ this.id = const Value.absent(), this.manufacture = const Value.absent(), this.title = const Value.absent(), this.color = const Value.absent(), }); WolleCompanion.insert({ this.id = const Value.absent(), required String manufacture, required String title, required int color, }) : manufacture = Value(manufacture), title = Value(title), color = Value(color); static Insertable custom({ Expression? id, Expression? manufacture, Expression? title, Expression? color, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (manufacture != null) 'manufacture': manufacture, if (title != null) 'title': title, if (color != null) 'color': color, }); } WolleCompanion copyWith( {Value? id, Value? manufacture, Value? title, Value? color}) { return WolleCompanion( id: id ?? this.id, manufacture: manufacture ?? this.manufacture, title: title ?? this.title, color: color ?? this.color, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (manufacture.present) { map['manufacture'] = Variable(manufacture.value); } if (title.present) { map['title'] = Variable(title.value); } if (color.present) { map['color'] = Variable(color.value); } return map; } @override String toString() { return (StringBuffer('WolleCompanion(') ..write('id: $id, ') ..write('manufacture: $manufacture, ') ..write('title: $title, ') ..write('color: $color') ..write(')')) .toString(); } } class $TempRangeTable extends TempRange with TableInfo<$TempRangeTable, TempRangeData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $TempRangeTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); static const VerificationMeta _minMeta = const VerificationMeta('min'); @override late final GeneratedColumn min = GeneratedColumn( 'min', aliasedName, false, type: DriftSqlType.double, requiredDuringInsert: true); static const VerificationMeta _maxMeta = const VerificationMeta('max'); @override late final GeneratedColumn max = GeneratedColumn( 'max', aliasedName, false, type: DriftSqlType.double, requiredDuringInsert: true); static const VerificationMeta _wolleMeta = const VerificationMeta('wolle'); @override late final GeneratedColumn wolle = GeneratedColumn( 'wolle', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES wolle (id)')); @override List get $columns => [id, min, max, wolle]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'temp_range'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } if (data.containsKey('min')) { context.handle( _minMeta, min.isAcceptableOrUnknown(data['min']!, _minMeta)); } else if (isInserting) { context.missing(_minMeta); } if (data.containsKey('max')) { context.handle( _maxMeta, max.isAcceptableOrUnknown(data['max']!, _maxMeta)); } else if (isInserting) { context.missing(_maxMeta); } if (data.containsKey('wolle')) { context.handle( _wolleMeta, wolle.isAcceptableOrUnknown(data['wolle']!, _wolleMeta)); } else if (isInserting) { context.missing(_wolleMeta); } return context; } @override Set get $primaryKey => {id}; @override TempRangeData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return TempRangeData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, min: attachedDatabase.typeMapping .read(DriftSqlType.double, data['${effectivePrefix}min'])!, max: attachedDatabase.typeMapping .read(DriftSqlType.double, data['${effectivePrefix}max'])!, wolle: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}wolle'])!, ); } @override $TempRangeTable createAlias(String alias) { return $TempRangeTable(attachedDatabase, alias); } } class TempRangeData extends DataClass implements Insertable { final int id; final double min; final double max; final int wolle; const TempRangeData( {required this.id, required this.min, required this.max, required this.wolle}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['min'] = Variable(min); map['max'] = Variable(max); map['wolle'] = Variable(wolle); return map; } TempRangeCompanion toCompanion(bool nullToAbsent) { return TempRangeCompanion( id: Value(id), min: Value(min), max: Value(max), wolle: Value(wolle), ); } factory TempRangeData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return TempRangeData( id: serializer.fromJson(json['id']), min: serializer.fromJson(json['min']), max: serializer.fromJson(json['max']), wolle: serializer.fromJson(json['wolle']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'min': serializer.toJson(min), 'max': serializer.toJson(max), 'wolle': serializer.toJson(wolle), }; } TempRangeData copyWith({int? id, double? min, double? max, int? wolle}) => TempRangeData( id: id ?? this.id, min: min ?? this.min, max: max ?? this.max, wolle: wolle ?? this.wolle, ); @override String toString() { return (StringBuffer('TempRangeData(') ..write('id: $id, ') ..write('min: $min, ') ..write('max: $max, ') ..write('wolle: $wolle') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, min, max, wolle); @override bool operator ==(Object other) => identical(this, other) || (other is TempRangeData && other.id == this.id && other.min == this.min && other.max == this.max && other.wolle == this.wolle); } class TempRangeCompanion extends UpdateCompanion { final Value id; final Value min; final Value max; final Value wolle; const TempRangeCompanion({ this.id = const Value.absent(), this.min = const Value.absent(), this.max = const Value.absent(), this.wolle = const Value.absent(), }); TempRangeCompanion.insert({ this.id = const Value.absent(), required double min, required double max, required int wolle, }) : min = Value(min), max = Value(max), wolle = Value(wolle); static Insertable custom({ Expression? id, Expression? min, Expression? max, Expression? wolle, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (min != null) 'min': min, if (max != null) 'max': max, if (wolle != null) 'wolle': wolle, }); } TempRangeCompanion copyWith( {Value? id, Value? min, Value? max, Value? wolle}) { return TempRangeCompanion( id: id ?? this.id, min: min ?? this.min, max: max ?? this.max, wolle: wolle ?? this.wolle, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (min.present) { map['min'] = Variable(min.value); } if (max.present) { map['max'] = Variable(max.value); } if (wolle.present) { map['wolle'] = Variable(wolle.value); } return map; } @override String toString() { return (StringBuffer('TempRangeCompanion(') ..write('id: $id, ') ..write('min: $min, ') ..write('max: $max, ') ..write('wolle: $wolle') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); late final $WolleTable wolle = $WolleTable(this); late final $TempRangeTable tempRange = $TempRangeTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [wolle, tempRange]; }