// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $VarietiesTable extends Varieties with TableInfo<$VarietiesTable, Variety> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $VarietiesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _labelMeta = const VerificationMeta('label'); @override late final GeneratedColumn label = GeneratedColumn( 'label', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _speciesIdMeta = const VerificationMeta( 'speciesId', ); @override late final GeneratedColumn speciesId = GeneratedColumn( 'species_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _cultivarNameMeta = const VerificationMeta( 'cultivarName', ); @override late final GeneratedColumn cultivarName = GeneratedColumn( 'cultivar_name', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _categoryMeta = const VerificationMeta( 'category', ); @override late final GeneratedColumn category = GeneratedColumn( 'category', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _notesMeta = const VerificationMeta('notes'); @override late final GeneratedColumn notes = GeneratedColumn( 'notes', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, label, speciesId, cultivarName, category, notes, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'varieties'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('label')) { context.handle( _labelMeta, label.isAcceptableOrUnknown(data['label']!, _labelMeta), ); } else if (isInserting) { context.missing(_labelMeta); } if (data.containsKey('species_id')) { context.handle( _speciesIdMeta, speciesId.isAcceptableOrUnknown(data['species_id']!, _speciesIdMeta), ); } if (data.containsKey('cultivar_name')) { context.handle( _cultivarNameMeta, cultivarName.isAcceptableOrUnknown( data['cultivar_name']!, _cultivarNameMeta, ), ); } if (data.containsKey('category')) { context.handle( _categoryMeta, category.isAcceptableOrUnknown(data['category']!, _categoryMeta), ); } if (data.containsKey('notes')) { context.handle( _notesMeta, notes.isAcceptableOrUnknown(data['notes']!, _notesMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Variety map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Variety( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, label: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}label'], )!, speciesId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}species_id'], ), cultivarName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}cultivar_name'], ), category: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}category'], ), notes: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}notes'], ), ); } @override $VarietiesTable createAlias(String alias) { return $VarietiesTable(attachedDatabase, alias); } } class Variety extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String label; final String? speciesId; final String? cultivarName; final String? category; final String? notes; const Variety({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.label, this.speciesId, this.cultivarName, this.category, this.notes, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['label'] = Variable(label); if (!nullToAbsent || speciesId != null) { map['species_id'] = Variable(speciesId); } if (!nullToAbsent || cultivarName != null) { map['cultivar_name'] = Variable(cultivarName); } if (!nullToAbsent || category != null) { map['category'] = Variable(category); } if (!nullToAbsent || notes != null) { map['notes'] = Variable(notes); } return map; } VarietiesCompanion toCompanion(bool nullToAbsent) { return VarietiesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), label: Value(label), speciesId: speciesId == null && nullToAbsent ? const Value.absent() : Value(speciesId), cultivarName: cultivarName == null && nullToAbsent ? const Value.absent() : Value(cultivarName), category: category == null && nullToAbsent ? const Value.absent() : Value(category), notes: notes == null && nullToAbsent ? const Value.absent() : Value(notes), ); } factory Variety.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Variety( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), label: serializer.fromJson(json['label']), speciesId: serializer.fromJson(json['speciesId']), cultivarName: serializer.fromJson(json['cultivarName']), category: serializer.fromJson(json['category']), notes: serializer.fromJson(json['notes']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'label': serializer.toJson(label), 'speciesId': serializer.toJson(speciesId), 'cultivarName': serializer.toJson(cultivarName), 'category': serializer.toJson(category), 'notes': serializer.toJson(notes), }; } Variety copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? label, Value speciesId = const Value.absent(), Value cultivarName = const Value.absent(), Value category = const Value.absent(), Value notes = const Value.absent(), }) => Variety( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, label: label ?? this.label, speciesId: speciesId.present ? speciesId.value : this.speciesId, cultivarName: cultivarName.present ? cultivarName.value : this.cultivarName, category: category.present ? category.value : this.category, notes: notes.present ? notes.value : this.notes, ); Variety copyWithCompanion(VarietiesCompanion data) { return Variety( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, label: data.label.present ? data.label.value : this.label, speciesId: data.speciesId.present ? data.speciesId.value : this.speciesId, cultivarName: data.cultivarName.present ? data.cultivarName.value : this.cultivarName, category: data.category.present ? data.category.value : this.category, notes: data.notes.present ? data.notes.value : this.notes, ); } @override String toString() { return (StringBuffer('Variety(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('label: $label, ') ..write('speciesId: $speciesId, ') ..write('cultivarName: $cultivarName, ') ..write('category: $category, ') ..write('notes: $notes') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, label, speciesId, cultivarName, category, notes, ); @override bool operator ==(Object other) => identical(this, other) || (other is Variety && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.label == this.label && other.speciesId == this.speciesId && other.cultivarName == this.cultivarName && other.category == this.category && other.notes == this.notes); } class VarietiesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value label; final Value speciesId; final Value cultivarName; final Value category; final Value notes; final Value rowid; const VarietiesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.label = const Value.absent(), this.speciesId = const Value.absent(), this.cultivarName = const Value.absent(), this.category = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }); VarietiesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String label, this.speciesId = const Value.absent(), this.cultivarName = const Value.absent(), this.category = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), label = Value(label); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? label, Expression? speciesId, Expression? cultivarName, Expression? category, Expression? notes, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (label != null) 'label': label, if (speciesId != null) 'species_id': speciesId, if (cultivarName != null) 'cultivar_name': cultivarName, if (category != null) 'category': category, if (notes != null) 'notes': notes, if (rowid != null) 'rowid': rowid, }); } VarietiesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? label, Value? speciesId, Value? cultivarName, Value? category, Value? notes, Value? rowid, }) { return VarietiesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, label: label ?? this.label, speciesId: speciesId ?? this.speciesId, cultivarName: cultivarName ?? this.cultivarName, category: category ?? this.category, notes: notes ?? this.notes, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (label.present) { map['label'] = Variable(label.value); } if (speciesId.present) { map['species_id'] = Variable(speciesId.value); } if (cultivarName.present) { map['cultivar_name'] = Variable(cultivarName.value); } if (category.present) { map['category'] = Variable(category.value); } if (notes.present) { map['notes'] = Variable(notes.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('VarietiesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('label: $label, ') ..write('speciesId: $speciesId, ') ..write('cultivarName: $cultivarName, ') ..write('category: $category, ') ..write('notes: $notes, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $VarietyVernacularNamesTable extends VarietyVernacularNames with TableInfo<$VarietyVernacularNamesTable, VarietyVernacularName> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $VarietyVernacularNamesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _varietyIdMeta = const VerificationMeta( 'varietyId', ); @override late final GeneratedColumn varietyId = GeneratedColumn( 'variety_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _languageMeta = const VerificationMeta( 'language', ); @override late final GeneratedColumn language = GeneratedColumn( 'language', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _regionMeta = const VerificationMeta('region'); @override late final GeneratedColumn region = GeneratedColumn( 'region', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, name, language, region, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'variety_vernacular_names'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('variety_id')) { context.handle( _varietyIdMeta, varietyId.isAcceptableOrUnknown(data['variety_id']!, _varietyIdMeta), ); } else if (isInserting) { context.missing(_varietyIdMeta); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('language')) { context.handle( _languageMeta, language.isAcceptableOrUnknown(data['language']!, _languageMeta), ); } if (data.containsKey('region')) { context.handle( _regionMeta, region.isAcceptableOrUnknown(data['region']!, _regionMeta), ); } return context; } @override Set get $primaryKey => {id}; @override VarietyVernacularName map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return VarietyVernacularName( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, varietyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}variety_id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, language: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}language'], ), region: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}region'], ), ); } @override $VarietyVernacularNamesTable createAlias(String alias) { return $VarietyVernacularNamesTable(attachedDatabase, alias); } } class VarietyVernacularName extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String varietyId; final String name; final String? language; final String? region; const VarietyVernacularName({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.varietyId, required this.name, this.language, this.region, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['variety_id'] = Variable(varietyId); map['name'] = Variable(name); if (!nullToAbsent || language != null) { map['language'] = Variable(language); } if (!nullToAbsent || region != null) { map['region'] = Variable(region); } return map; } VarietyVernacularNamesCompanion toCompanion(bool nullToAbsent) { return VarietyVernacularNamesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), varietyId: Value(varietyId), name: Value(name), language: language == null && nullToAbsent ? const Value.absent() : Value(language), region: region == null && nullToAbsent ? const Value.absent() : Value(region), ); } factory VarietyVernacularName.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return VarietyVernacularName( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), varietyId: serializer.fromJson(json['varietyId']), name: serializer.fromJson(json['name']), language: serializer.fromJson(json['language']), region: serializer.fromJson(json['region']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'varietyId': serializer.toJson(varietyId), 'name': serializer.toJson(name), 'language': serializer.toJson(language), 'region': serializer.toJson(region), }; } VarietyVernacularName copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? varietyId, String? name, Value language = const Value.absent(), Value region = const Value.absent(), }) => VarietyVernacularName( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, name: name ?? this.name, language: language.present ? language.value : this.language, region: region.present ? region.value : this.region, ); VarietyVernacularName copyWithCompanion( VarietyVernacularNamesCompanion data, ) { return VarietyVernacularName( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, varietyId: data.varietyId.present ? data.varietyId.value : this.varietyId, name: data.name.present ? data.name.value : this.name, language: data.language.present ? data.language.value : this.language, region: data.region.present ? data.region.value : this.region, ); } @override String toString() { return (StringBuffer('VarietyVernacularName(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('name: $name, ') ..write('language: $language, ') ..write('region: $region') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, name, language, region, ); @override bool operator ==(Object other) => identical(this, other) || (other is VarietyVernacularName && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.varietyId == this.varietyId && other.name == this.name && other.language == this.language && other.region == this.region); } class VarietyVernacularNamesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value varietyId; final Value name; final Value language; final Value region; final Value rowid; const VarietyVernacularNamesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), this.name = const Value.absent(), this.language = const Value.absent(), this.region = const Value.absent(), this.rowid = const Value.absent(), }); VarietyVernacularNamesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String varietyId, required String name, this.language = const Value.absent(), this.region = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), varietyId = Value(varietyId), name = Value(name); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? varietyId, Expression? name, Expression? language, Expression? region, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (varietyId != null) 'variety_id': varietyId, if (name != null) 'name': name, if (language != null) 'language': language, if (region != null) 'region': region, if (rowid != null) 'rowid': rowid, }); } VarietyVernacularNamesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? varietyId, Value? name, Value? language, Value? region, Value? rowid, }) { return VarietyVernacularNamesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, name: name ?? this.name, language: language ?? this.language, region: region ?? this.region, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (varietyId.present) { map['variety_id'] = Variable(varietyId.value); } if (name.present) { map['name'] = Variable(name.value); } if (language.present) { map['language'] = Variable(language.value); } if (region.present) { map['region'] = Variable(region.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('VarietyVernacularNamesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('name: $name, ') ..write('language: $language, ') ..write('region: $region, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $SpeciesTable extends Species with TableInfo<$SpeciesTable, Specy> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SpeciesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _scientificNameMeta = const VerificationMeta( 'scientificName', ); @override late final GeneratedColumn scientificName = GeneratedColumn( 'scientific_name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _wikidataQidMeta = const VerificationMeta( 'wikidataQid', ); @override late final GeneratedColumn wikidataQid = GeneratedColumn( 'wikidata_qid', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _gbifKeyMeta = const VerificationMeta( 'gbifKey', ); @override late final GeneratedColumn gbifKey = GeneratedColumn( 'gbif_key', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _familyMeta = const VerificationMeta('family'); @override late final GeneratedColumn family = GeneratedColumn( 'family', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _isBundledMeta = const VerificationMeta( 'isBundled', ); @override late final GeneratedColumn isBundled = GeneratedColumn( 'is_bundled', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_bundled" IN (0, 1))', ), defaultValue: const Constant(false), ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, scientificName, wikidataQid, gbifKey, family, isBundled, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'species'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('scientific_name')) { context.handle( _scientificNameMeta, scientificName.isAcceptableOrUnknown( data['scientific_name']!, _scientificNameMeta, ), ); } else if (isInserting) { context.missing(_scientificNameMeta); } if (data.containsKey('wikidata_qid')) { context.handle( _wikidataQidMeta, wikidataQid.isAcceptableOrUnknown( data['wikidata_qid']!, _wikidataQidMeta, ), ); } if (data.containsKey('gbif_key')) { context.handle( _gbifKeyMeta, gbifKey.isAcceptableOrUnknown(data['gbif_key']!, _gbifKeyMeta), ); } if (data.containsKey('family')) { context.handle( _familyMeta, family.isAcceptableOrUnknown(data['family']!, _familyMeta), ); } if (data.containsKey('is_bundled')) { context.handle( _isBundledMeta, isBundled.isAcceptableOrUnknown(data['is_bundled']!, _isBundledMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Specy map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Specy( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, scientificName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}scientific_name'], )!, wikidataQid: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}wikidata_qid'], ), gbifKey: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}gbif_key'], ), family: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}family'], ), isBundled: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_bundled'], )!, ); } @override $SpeciesTable createAlias(String alias) { return $SpeciesTable(attachedDatabase, alias); } } class Specy extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String scientificName; final String? wikidataQid; final int? gbifKey; final String? family; final bool isBundled; const Specy({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.scientificName, this.wikidataQid, this.gbifKey, this.family, required this.isBundled, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['scientific_name'] = Variable(scientificName); if (!nullToAbsent || wikidataQid != null) { map['wikidata_qid'] = Variable(wikidataQid); } if (!nullToAbsent || gbifKey != null) { map['gbif_key'] = Variable(gbifKey); } if (!nullToAbsent || family != null) { map['family'] = Variable(family); } map['is_bundled'] = Variable(isBundled); return map; } SpeciesCompanion toCompanion(bool nullToAbsent) { return SpeciesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), scientificName: Value(scientificName), wikidataQid: wikidataQid == null && nullToAbsent ? const Value.absent() : Value(wikidataQid), gbifKey: gbifKey == null && nullToAbsent ? const Value.absent() : Value(gbifKey), family: family == null && nullToAbsent ? const Value.absent() : Value(family), isBundled: Value(isBundled), ); } factory Specy.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Specy( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), scientificName: serializer.fromJson(json['scientificName']), wikidataQid: serializer.fromJson(json['wikidataQid']), gbifKey: serializer.fromJson(json['gbifKey']), family: serializer.fromJson(json['family']), isBundled: serializer.fromJson(json['isBundled']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'scientificName': serializer.toJson(scientificName), 'wikidataQid': serializer.toJson(wikidataQid), 'gbifKey': serializer.toJson(gbifKey), 'family': serializer.toJson(family), 'isBundled': serializer.toJson(isBundled), }; } Specy copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? scientificName, Value wikidataQid = const Value.absent(), Value gbifKey = const Value.absent(), Value family = const Value.absent(), bool? isBundled, }) => Specy( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, scientificName: scientificName ?? this.scientificName, wikidataQid: wikidataQid.present ? wikidataQid.value : this.wikidataQid, gbifKey: gbifKey.present ? gbifKey.value : this.gbifKey, family: family.present ? family.value : this.family, isBundled: isBundled ?? this.isBundled, ); Specy copyWithCompanion(SpeciesCompanion data) { return Specy( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, scientificName: data.scientificName.present ? data.scientificName.value : this.scientificName, wikidataQid: data.wikidataQid.present ? data.wikidataQid.value : this.wikidataQid, gbifKey: data.gbifKey.present ? data.gbifKey.value : this.gbifKey, family: data.family.present ? data.family.value : this.family, isBundled: data.isBundled.present ? data.isBundled.value : this.isBundled, ); } @override String toString() { return (StringBuffer('Specy(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('scientificName: $scientificName, ') ..write('wikidataQid: $wikidataQid, ') ..write('gbifKey: $gbifKey, ') ..write('family: $family, ') ..write('isBundled: $isBundled') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, scientificName, wikidataQid, gbifKey, family, isBundled, ); @override bool operator ==(Object other) => identical(this, other) || (other is Specy && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.scientificName == this.scientificName && other.wikidataQid == this.wikidataQid && other.gbifKey == this.gbifKey && other.family == this.family && other.isBundled == this.isBundled); } class SpeciesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value scientificName; final Value wikidataQid; final Value gbifKey; final Value family; final Value isBundled; final Value rowid; const SpeciesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.scientificName = const Value.absent(), this.wikidataQid = const Value.absent(), this.gbifKey = const Value.absent(), this.family = const Value.absent(), this.isBundled = const Value.absent(), this.rowid = const Value.absent(), }); SpeciesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String scientificName, this.wikidataQid = const Value.absent(), this.gbifKey = const Value.absent(), this.family = const Value.absent(), this.isBundled = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), scientificName = Value(scientificName); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? scientificName, Expression? wikidataQid, Expression? gbifKey, Expression? family, Expression? isBundled, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (scientificName != null) 'scientific_name': scientificName, if (wikidataQid != null) 'wikidata_qid': wikidataQid, if (gbifKey != null) 'gbif_key': gbifKey, if (family != null) 'family': family, if (isBundled != null) 'is_bundled': isBundled, if (rowid != null) 'rowid': rowid, }); } SpeciesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? scientificName, Value? wikidataQid, Value? gbifKey, Value? family, Value? isBundled, Value? rowid, }) { return SpeciesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, scientificName: scientificName ?? this.scientificName, wikidataQid: wikidataQid ?? this.wikidataQid, gbifKey: gbifKey ?? this.gbifKey, family: family ?? this.family, isBundled: isBundled ?? this.isBundled, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (scientificName.present) { map['scientific_name'] = Variable(scientificName.value); } if (wikidataQid.present) { map['wikidata_qid'] = Variable(wikidataQid.value); } if (gbifKey.present) { map['gbif_key'] = Variable(gbifKey.value); } if (family.present) { map['family'] = Variable(family.value); } if (isBundled.present) { map['is_bundled'] = Variable(isBundled.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SpeciesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('scientificName: $scientificName, ') ..write('wikidataQid: $wikidataQid, ') ..write('gbifKey: $gbifKey, ') ..write('family: $family, ') ..write('isBundled: $isBundled, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $SpeciesCommonNamesTable extends SpeciesCommonNames with TableInfo<$SpeciesCommonNamesTable, SpeciesCommonName> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SpeciesCommonNamesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _speciesIdMeta = const VerificationMeta( 'speciesId', ); @override late final GeneratedColumn speciesId = GeneratedColumn( 'species_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _languageMeta = const VerificationMeta( 'language', ); @override late final GeneratedColumn language = GeneratedColumn( 'language', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, speciesId, name, language, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'species_common_names'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('species_id')) { context.handle( _speciesIdMeta, speciesId.isAcceptableOrUnknown(data['species_id']!, _speciesIdMeta), ); } else if (isInserting) { context.missing(_speciesIdMeta); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('language')) { context.handle( _languageMeta, language.isAcceptableOrUnknown(data['language']!, _languageMeta), ); } return context; } @override Set get $primaryKey => {id}; @override SpeciesCommonName map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SpeciesCommonName( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, speciesId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}species_id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, language: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}language'], ), ); } @override $SpeciesCommonNamesTable createAlias(String alias) { return $SpeciesCommonNamesTable(attachedDatabase, alias); } } class SpeciesCommonName extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String speciesId; final String name; final String? language; const SpeciesCommonName({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.speciesId, required this.name, this.language, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['species_id'] = Variable(speciesId); map['name'] = Variable(name); if (!nullToAbsent || language != null) { map['language'] = Variable(language); } return map; } SpeciesCommonNamesCompanion toCompanion(bool nullToAbsent) { return SpeciesCommonNamesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), speciesId: Value(speciesId), name: Value(name), language: language == null && nullToAbsent ? const Value.absent() : Value(language), ); } factory SpeciesCommonName.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return SpeciesCommonName( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), speciesId: serializer.fromJson(json['speciesId']), name: serializer.fromJson(json['name']), language: serializer.fromJson(json['language']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'speciesId': serializer.toJson(speciesId), 'name': serializer.toJson(name), 'language': serializer.toJson(language), }; } SpeciesCommonName copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? speciesId, String? name, Value language = const Value.absent(), }) => SpeciesCommonName( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, speciesId: speciesId ?? this.speciesId, name: name ?? this.name, language: language.present ? language.value : this.language, ); SpeciesCommonName copyWithCompanion(SpeciesCommonNamesCompanion data) { return SpeciesCommonName( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, speciesId: data.speciesId.present ? data.speciesId.value : this.speciesId, name: data.name.present ? data.name.value : this.name, language: data.language.present ? data.language.value : this.language, ); } @override String toString() { return (StringBuffer('SpeciesCommonName(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('speciesId: $speciesId, ') ..write('name: $name, ') ..write('language: $language') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, speciesId, name, language, ); @override bool operator ==(Object other) => identical(this, other) || (other is SpeciesCommonName && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.speciesId == this.speciesId && other.name == this.name && other.language == this.language); } class SpeciesCommonNamesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value speciesId; final Value name; final Value language; final Value rowid; const SpeciesCommonNamesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.speciesId = const Value.absent(), this.name = const Value.absent(), this.language = const Value.absent(), this.rowid = const Value.absent(), }); SpeciesCommonNamesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String speciesId, required String name, this.language = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), speciesId = Value(speciesId), name = Value(name); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? speciesId, Expression? name, Expression? language, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (speciesId != null) 'species_id': speciesId, if (name != null) 'name': name, if (language != null) 'language': language, if (rowid != null) 'rowid': rowid, }); } SpeciesCommonNamesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? speciesId, Value? name, Value? language, Value? rowid, }) { return SpeciesCommonNamesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, speciesId: speciesId ?? this.speciesId, name: name ?? this.name, language: language ?? this.language, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (speciesId.present) { map['species_id'] = Variable(speciesId.value); } if (name.present) { map['name'] = Variable(name.value); } if (language.present) { map['language'] = Variable(language.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SpeciesCommonNamesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('speciesId: $speciesId, ') ..write('name: $name, ') ..write('language: $language, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $LotsTable extends Lots with TableInfo<$LotsTable, Lot> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $LotsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _varietyIdMeta = const VerificationMeta( 'varietyId', ); @override late final GeneratedColumn varietyId = GeneratedColumn( 'variety_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _harvestYearMeta = const VerificationMeta( 'harvestYear', ); @override late final GeneratedColumn harvestYear = GeneratedColumn( 'harvest_year', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _quantityKindMeta = const VerificationMeta( 'quantityKind', ); @override late final GeneratedColumn quantityKind = GeneratedColumn( 'quantity_kind', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _quantityPreciseMeta = const VerificationMeta( 'quantityPrecise', ); @override late final GeneratedColumn quantityPrecise = GeneratedColumn( 'quantity_precise', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false, ); static const VerificationMeta _quantityLabelMeta = const VerificationMeta( 'quantityLabel', ); @override late final GeneratedColumn quantityLabel = GeneratedColumn( 'quantity_label', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _storageLocationMeta = const VerificationMeta( 'storageLocation', ); @override late final GeneratedColumn storageLocation = GeneratedColumn( 'storage_location', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter offerStatus = GeneratedColumn( 'offer_status', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('private'), ).withConverter($LotsTable.$converterofferStatus); static const VerificationMeta _seedbankIdMeta = const VerificationMeta( 'seedbankId', ); @override late final GeneratedColumn seedbankId = GeneratedColumn( 'seedbank_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, harvestYear, quantityKind, quantityPrecise, quantityLabel, storageLocation, offerStatus, seedbankId, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'lots'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('variety_id')) { context.handle( _varietyIdMeta, varietyId.isAcceptableOrUnknown(data['variety_id']!, _varietyIdMeta), ); } else if (isInserting) { context.missing(_varietyIdMeta); } if (data.containsKey('harvest_year')) { context.handle( _harvestYearMeta, harvestYear.isAcceptableOrUnknown( data['harvest_year']!, _harvestYearMeta, ), ); } if (data.containsKey('quantity_kind')) { context.handle( _quantityKindMeta, quantityKind.isAcceptableOrUnknown( data['quantity_kind']!, _quantityKindMeta, ), ); } if (data.containsKey('quantity_precise')) { context.handle( _quantityPreciseMeta, quantityPrecise.isAcceptableOrUnknown( data['quantity_precise']!, _quantityPreciseMeta, ), ); } if (data.containsKey('quantity_label')) { context.handle( _quantityLabelMeta, quantityLabel.isAcceptableOrUnknown( data['quantity_label']!, _quantityLabelMeta, ), ); } if (data.containsKey('storage_location')) { context.handle( _storageLocationMeta, storageLocation.isAcceptableOrUnknown( data['storage_location']!, _storageLocationMeta, ), ); } if (data.containsKey('seedbank_id')) { context.handle( _seedbankIdMeta, seedbankId.isAcceptableOrUnknown(data['seedbank_id']!, _seedbankIdMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Lot map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Lot( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, varietyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}variety_id'], )!, harvestYear: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}harvest_year'], ), quantityKind: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_kind'], ), quantityPrecise: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}quantity_precise'], ), quantityLabel: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_label'], ), storageLocation: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}storage_location'], ), offerStatus: $LotsTable.$converterofferStatus.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}offer_status'], )!, ), seedbankId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}seedbank_id'], ), ); } @override $LotsTable createAlias(String alias) { return $LotsTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterofferStatus = const EnumNameConverter(OfferStatus.values); } class Lot extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String varietyId; final int? harvestYear; final String? quantityKind; final double? quantityPrecise; final String? quantityLabel; final String? storageLocation; final OfferStatus offerStatus; final String? seedbankId; const Lot({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.varietyId, this.harvestYear, this.quantityKind, this.quantityPrecise, this.quantityLabel, this.storageLocation, required this.offerStatus, this.seedbankId, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['variety_id'] = Variable(varietyId); if (!nullToAbsent || harvestYear != null) { map['harvest_year'] = Variable(harvestYear); } if (!nullToAbsent || quantityKind != null) { map['quantity_kind'] = Variable(quantityKind); } if (!nullToAbsent || quantityPrecise != null) { map['quantity_precise'] = Variable(quantityPrecise); } if (!nullToAbsent || quantityLabel != null) { map['quantity_label'] = Variable(quantityLabel); } if (!nullToAbsent || storageLocation != null) { map['storage_location'] = Variable(storageLocation); } { map['offer_status'] = Variable( $LotsTable.$converterofferStatus.toSql(offerStatus), ); } if (!nullToAbsent || seedbankId != null) { map['seedbank_id'] = Variable(seedbankId); } return map; } LotsCompanion toCompanion(bool nullToAbsent) { return LotsCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), varietyId: Value(varietyId), harvestYear: harvestYear == null && nullToAbsent ? const Value.absent() : Value(harvestYear), quantityKind: quantityKind == null && nullToAbsent ? const Value.absent() : Value(quantityKind), quantityPrecise: quantityPrecise == null && nullToAbsent ? const Value.absent() : Value(quantityPrecise), quantityLabel: quantityLabel == null && nullToAbsent ? const Value.absent() : Value(quantityLabel), storageLocation: storageLocation == null && nullToAbsent ? const Value.absent() : Value(storageLocation), offerStatus: Value(offerStatus), seedbankId: seedbankId == null && nullToAbsent ? const Value.absent() : Value(seedbankId), ); } factory Lot.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Lot( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), varietyId: serializer.fromJson(json['varietyId']), harvestYear: serializer.fromJson(json['harvestYear']), quantityKind: serializer.fromJson(json['quantityKind']), quantityPrecise: serializer.fromJson(json['quantityPrecise']), quantityLabel: serializer.fromJson(json['quantityLabel']), storageLocation: serializer.fromJson(json['storageLocation']), offerStatus: $LotsTable.$converterofferStatus.fromJson( serializer.fromJson(json['offerStatus']), ), seedbankId: serializer.fromJson(json['seedbankId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'varietyId': serializer.toJson(varietyId), 'harvestYear': serializer.toJson(harvestYear), 'quantityKind': serializer.toJson(quantityKind), 'quantityPrecise': serializer.toJson(quantityPrecise), 'quantityLabel': serializer.toJson(quantityLabel), 'storageLocation': serializer.toJson(storageLocation), 'offerStatus': serializer.toJson( $LotsTable.$converterofferStatus.toJson(offerStatus), ), 'seedbankId': serializer.toJson(seedbankId), }; } Lot copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? varietyId, Value harvestYear = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value storageLocation = const Value.absent(), OfferStatus? offerStatus, Value seedbankId = const Value.absent(), }) => Lot( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, harvestYear: harvestYear.present ? harvestYear.value : this.harvestYear, quantityKind: quantityKind.present ? quantityKind.value : this.quantityKind, quantityPrecise: quantityPrecise.present ? quantityPrecise.value : this.quantityPrecise, quantityLabel: quantityLabel.present ? quantityLabel.value : this.quantityLabel, storageLocation: storageLocation.present ? storageLocation.value : this.storageLocation, offerStatus: offerStatus ?? this.offerStatus, seedbankId: seedbankId.present ? seedbankId.value : this.seedbankId, ); Lot copyWithCompanion(LotsCompanion data) { return Lot( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, varietyId: data.varietyId.present ? data.varietyId.value : this.varietyId, harvestYear: data.harvestYear.present ? data.harvestYear.value : this.harvestYear, quantityKind: data.quantityKind.present ? data.quantityKind.value : this.quantityKind, quantityPrecise: data.quantityPrecise.present ? data.quantityPrecise.value : this.quantityPrecise, quantityLabel: data.quantityLabel.present ? data.quantityLabel.value : this.quantityLabel, storageLocation: data.storageLocation.present ? data.storageLocation.value : this.storageLocation, offerStatus: data.offerStatus.present ? data.offerStatus.value : this.offerStatus, seedbankId: data.seedbankId.present ? data.seedbankId.value : this.seedbankId, ); } @override String toString() { return (StringBuffer('Lot(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('harvestYear: $harvestYear, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('storageLocation: $storageLocation, ') ..write('offerStatus: $offerStatus, ') ..write('seedbankId: $seedbankId') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, harvestYear, quantityKind, quantityPrecise, quantityLabel, storageLocation, offerStatus, seedbankId, ); @override bool operator ==(Object other) => identical(this, other) || (other is Lot && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.varietyId == this.varietyId && other.harvestYear == this.harvestYear && other.quantityKind == this.quantityKind && other.quantityPrecise == this.quantityPrecise && other.quantityLabel == this.quantityLabel && other.storageLocation == this.storageLocation && other.offerStatus == this.offerStatus && other.seedbankId == this.seedbankId); } class LotsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value varietyId; final Value harvestYear; final Value quantityKind; final Value quantityPrecise; final Value quantityLabel; final Value storageLocation; final Value offerStatus; final Value seedbankId; final Value rowid; const LotsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), this.harvestYear = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.storageLocation = const Value.absent(), this.offerStatus = const Value.absent(), this.seedbankId = const Value.absent(), this.rowid = const Value.absent(), }); LotsCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String varietyId, this.harvestYear = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.storageLocation = const Value.absent(), this.offerStatus = const Value.absent(), this.seedbankId = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), varietyId = Value(varietyId); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? varietyId, Expression? harvestYear, Expression? quantityKind, Expression? quantityPrecise, Expression? quantityLabel, Expression? storageLocation, Expression? offerStatus, Expression? seedbankId, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (varietyId != null) 'variety_id': varietyId, if (harvestYear != null) 'harvest_year': harvestYear, if (quantityKind != null) 'quantity_kind': quantityKind, if (quantityPrecise != null) 'quantity_precise': quantityPrecise, if (quantityLabel != null) 'quantity_label': quantityLabel, if (storageLocation != null) 'storage_location': storageLocation, if (offerStatus != null) 'offer_status': offerStatus, if (seedbankId != null) 'seedbank_id': seedbankId, if (rowid != null) 'rowid': rowid, }); } LotsCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? varietyId, Value? harvestYear, Value? quantityKind, Value? quantityPrecise, Value? quantityLabel, Value? storageLocation, Value? offerStatus, Value? seedbankId, Value? rowid, }) { return LotsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, harvestYear: harvestYear ?? this.harvestYear, quantityKind: quantityKind ?? this.quantityKind, quantityPrecise: quantityPrecise ?? this.quantityPrecise, quantityLabel: quantityLabel ?? this.quantityLabel, storageLocation: storageLocation ?? this.storageLocation, offerStatus: offerStatus ?? this.offerStatus, seedbankId: seedbankId ?? this.seedbankId, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (varietyId.present) { map['variety_id'] = Variable(varietyId.value); } if (harvestYear.present) { map['harvest_year'] = Variable(harvestYear.value); } if (quantityKind.present) { map['quantity_kind'] = Variable(quantityKind.value); } if (quantityPrecise.present) { map['quantity_precise'] = Variable(quantityPrecise.value); } if (quantityLabel.present) { map['quantity_label'] = Variable(quantityLabel.value); } if (storageLocation.present) { map['storage_location'] = Variable(storageLocation.value); } if (offerStatus.present) { map['offer_status'] = Variable( $LotsTable.$converterofferStatus.toSql(offerStatus.value), ); } if (seedbankId.present) { map['seedbank_id'] = Variable(seedbankId.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('LotsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('harvestYear: $harvestYear, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('storageLocation: $storageLocation, ') ..write('offerStatus: $offerStatus, ') ..write('seedbankId: $seedbankId, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $GerminationTestsTable extends GerminationTests with TableInfo<$GerminationTestsTable, GerminationTest> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $GerminationTestsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _lotIdMeta = const VerificationMeta('lotId'); @override late final GeneratedColumn lotId = GeneratedColumn( 'lot_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _testedOnMeta = const VerificationMeta( 'testedOn', ); @override late final GeneratedColumn testedOn = GeneratedColumn( 'tested_on', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _sampleSizeMeta = const VerificationMeta( 'sampleSize', ); @override late final GeneratedColumn sampleSize = GeneratedColumn( 'sample_size', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _germinatedCountMeta = const VerificationMeta( 'germinatedCount', ); @override late final GeneratedColumn germinatedCount = GeneratedColumn( 'germinated_count', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _notesMeta = const VerificationMeta('notes'); @override late final GeneratedColumn notes = GeneratedColumn( 'notes', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, lotId, testedOn, sampleSize, germinatedCount, notes, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'germination_tests'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('lot_id')) { context.handle( _lotIdMeta, lotId.isAcceptableOrUnknown(data['lot_id']!, _lotIdMeta), ); } else if (isInserting) { context.missing(_lotIdMeta); } if (data.containsKey('tested_on')) { context.handle( _testedOnMeta, testedOn.isAcceptableOrUnknown(data['tested_on']!, _testedOnMeta), ); } if (data.containsKey('sample_size')) { context.handle( _sampleSizeMeta, sampleSize.isAcceptableOrUnknown(data['sample_size']!, _sampleSizeMeta), ); } if (data.containsKey('germinated_count')) { context.handle( _germinatedCountMeta, germinatedCount.isAcceptableOrUnknown( data['germinated_count']!, _germinatedCountMeta, ), ); } if (data.containsKey('notes')) { context.handle( _notesMeta, notes.isAcceptableOrUnknown(data['notes']!, _notesMeta), ); } return context; } @override Set get $primaryKey => {id}; @override GerminationTest map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return GerminationTest( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, lotId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}lot_id'], )!, testedOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}tested_on'], ), sampleSize: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sample_size'], ), germinatedCount: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}germinated_count'], ), notes: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}notes'], ), ); } @override $GerminationTestsTable createAlias(String alias) { return $GerminationTestsTable(attachedDatabase, alias); } } class GerminationTest extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String lotId; final int? testedOn; final int? sampleSize; final int? germinatedCount; final String? notes; const GerminationTest({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.lotId, this.testedOn, this.sampleSize, this.germinatedCount, this.notes, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['lot_id'] = Variable(lotId); if (!nullToAbsent || testedOn != null) { map['tested_on'] = Variable(testedOn); } if (!nullToAbsent || sampleSize != null) { map['sample_size'] = Variable(sampleSize); } if (!nullToAbsent || germinatedCount != null) { map['germinated_count'] = Variable(germinatedCount); } if (!nullToAbsent || notes != null) { map['notes'] = Variable(notes); } return map; } GerminationTestsCompanion toCompanion(bool nullToAbsent) { return GerminationTestsCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), lotId: Value(lotId), testedOn: testedOn == null && nullToAbsent ? const Value.absent() : Value(testedOn), sampleSize: sampleSize == null && nullToAbsent ? const Value.absent() : Value(sampleSize), germinatedCount: germinatedCount == null && nullToAbsent ? const Value.absent() : Value(germinatedCount), notes: notes == null && nullToAbsent ? const Value.absent() : Value(notes), ); } factory GerminationTest.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return GerminationTest( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), lotId: serializer.fromJson(json['lotId']), testedOn: serializer.fromJson(json['testedOn']), sampleSize: serializer.fromJson(json['sampleSize']), germinatedCount: serializer.fromJson(json['germinatedCount']), notes: serializer.fromJson(json['notes']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'lotId': serializer.toJson(lotId), 'testedOn': serializer.toJson(testedOn), 'sampleSize': serializer.toJson(sampleSize), 'germinatedCount': serializer.toJson(germinatedCount), 'notes': serializer.toJson(notes), }; } GerminationTest copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? lotId, Value testedOn = const Value.absent(), Value sampleSize = const Value.absent(), Value germinatedCount = const Value.absent(), Value notes = const Value.absent(), }) => GerminationTest( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, testedOn: testedOn.present ? testedOn.value : this.testedOn, sampleSize: sampleSize.present ? sampleSize.value : this.sampleSize, germinatedCount: germinatedCount.present ? germinatedCount.value : this.germinatedCount, notes: notes.present ? notes.value : this.notes, ); GerminationTest copyWithCompanion(GerminationTestsCompanion data) { return GerminationTest( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, lotId: data.lotId.present ? data.lotId.value : this.lotId, testedOn: data.testedOn.present ? data.testedOn.value : this.testedOn, sampleSize: data.sampleSize.present ? data.sampleSize.value : this.sampleSize, germinatedCount: data.germinatedCount.present ? data.germinatedCount.value : this.germinatedCount, notes: data.notes.present ? data.notes.value : this.notes, ); } @override String toString() { return (StringBuffer('GerminationTest(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('testedOn: $testedOn, ') ..write('sampleSize: $sampleSize, ') ..write('germinatedCount: $germinatedCount, ') ..write('notes: $notes') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, lotId, testedOn, sampleSize, germinatedCount, notes, ); @override bool operator ==(Object other) => identical(this, other) || (other is GerminationTest && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.lotId == this.lotId && other.testedOn == this.testedOn && other.sampleSize == this.sampleSize && other.germinatedCount == this.germinatedCount && other.notes == this.notes); } class GerminationTestsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value lotId; final Value testedOn; final Value sampleSize; final Value germinatedCount; final Value notes; final Value rowid; const GerminationTestsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.lotId = const Value.absent(), this.testedOn = const Value.absent(), this.sampleSize = const Value.absent(), this.germinatedCount = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }); GerminationTestsCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String lotId, this.testedOn = const Value.absent(), this.sampleSize = const Value.absent(), this.germinatedCount = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), lotId = Value(lotId); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? lotId, Expression? testedOn, Expression? sampleSize, Expression? germinatedCount, Expression? notes, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (lotId != null) 'lot_id': lotId, if (testedOn != null) 'tested_on': testedOn, if (sampleSize != null) 'sample_size': sampleSize, if (germinatedCount != null) 'germinated_count': germinatedCount, if (notes != null) 'notes': notes, if (rowid != null) 'rowid': rowid, }); } GerminationTestsCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? lotId, Value? testedOn, Value? sampleSize, Value? germinatedCount, Value? notes, Value? rowid, }) { return GerminationTestsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, testedOn: testedOn ?? this.testedOn, sampleSize: sampleSize ?? this.sampleSize, germinatedCount: germinatedCount ?? this.germinatedCount, notes: notes ?? this.notes, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (lotId.present) { map['lot_id'] = Variable(lotId.value); } if (testedOn.present) { map['tested_on'] = Variable(testedOn.value); } if (sampleSize.present) { map['sample_size'] = Variable(sampleSize.value); } if (germinatedCount.present) { map['germinated_count'] = Variable(germinatedCount.value); } if (notes.present) { map['notes'] = Variable(notes.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('GerminationTestsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('testedOn: $testedOn, ') ..write('sampleSize: $sampleSize, ') ..write('germinatedCount: $germinatedCount, ') ..write('notes: $notes, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $MovementsTable extends Movements with TableInfo<$MovementsTable, Movement> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $MovementsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _lotIdMeta = const VerificationMeta('lotId'); @override late final GeneratedColumn lotId = GeneratedColumn( 'lot_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); @override late final GeneratedColumnWithTypeConverter type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($MovementsTable.$convertertype); static const VerificationMeta _occurredOnMeta = const VerificationMeta( 'occurredOn', ); @override late final GeneratedColumn occurredOn = GeneratedColumn( 'occurred_on', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _counterpartyIdMeta = const VerificationMeta( 'counterpartyId', ); @override late final GeneratedColumn counterpartyId = GeneratedColumn( 'counterparty_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _quantityKindMeta = const VerificationMeta( 'quantityKind', ); @override late final GeneratedColumn quantityKind = GeneratedColumn( 'quantity_kind', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _quantityPreciseMeta = const VerificationMeta( 'quantityPrecise', ); @override late final GeneratedColumn quantityPrecise = GeneratedColumn( 'quantity_precise', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false, ); static const VerificationMeta _quantityLabelMeta = const VerificationMeta( 'quantityLabel', ); @override late final GeneratedColumn quantityLabel = GeneratedColumn( 'quantity_label', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _parentMovementIdMeta = const VerificationMeta( 'parentMovementId', ); @override late final GeneratedColumn parentMovementId = GeneratedColumn( 'parent_movement_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _plantareIdMeta = const VerificationMeta( 'plantareId', ); @override late final GeneratedColumn plantareId = GeneratedColumn( 'plantare_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _notesMeta = const VerificationMeta('notes'); @override late final GeneratedColumn notes = GeneratedColumn( 'notes', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, lastAuthor, schemaRowVersion, lotId, type, occurredOn, counterpartyId, quantityKind, quantityPrecise, quantityLabel, parentMovementId, plantareId, notes, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'movements'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('lot_id')) { context.handle( _lotIdMeta, lotId.isAcceptableOrUnknown(data['lot_id']!, _lotIdMeta), ); } else if (isInserting) { context.missing(_lotIdMeta); } if (data.containsKey('occurred_on')) { context.handle( _occurredOnMeta, occurredOn.isAcceptableOrUnknown(data['occurred_on']!, _occurredOnMeta), ); } if (data.containsKey('counterparty_id')) { context.handle( _counterpartyIdMeta, counterpartyId.isAcceptableOrUnknown( data['counterparty_id']!, _counterpartyIdMeta, ), ); } if (data.containsKey('quantity_kind')) { context.handle( _quantityKindMeta, quantityKind.isAcceptableOrUnknown( data['quantity_kind']!, _quantityKindMeta, ), ); } if (data.containsKey('quantity_precise')) { context.handle( _quantityPreciseMeta, quantityPrecise.isAcceptableOrUnknown( data['quantity_precise']!, _quantityPreciseMeta, ), ); } if (data.containsKey('quantity_label')) { context.handle( _quantityLabelMeta, quantityLabel.isAcceptableOrUnknown( data['quantity_label']!, _quantityLabelMeta, ), ); } if (data.containsKey('parent_movement_id')) { context.handle( _parentMovementIdMeta, parentMovementId.isAcceptableOrUnknown( data['parent_movement_id']!, _parentMovementIdMeta, ), ); } if (data.containsKey('plantare_id')) { context.handle( _plantareIdMeta, plantareId.isAcceptableOrUnknown(data['plantare_id']!, _plantareIdMeta), ); } if (data.containsKey('notes')) { context.handle( _notesMeta, notes.isAcceptableOrUnknown(data['notes']!, _notesMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Movement map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Movement( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, lotId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}lot_id'], )!, type: $MovementsTable.$convertertype.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}type'], )!, ), occurredOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}occurred_on'], ), counterpartyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}counterparty_id'], ), quantityKind: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_kind'], ), quantityPrecise: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}quantity_precise'], ), quantityLabel: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_label'], ), parentMovementId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_movement_id'], ), plantareId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}plantare_id'], ), notes: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}notes'], ), ); } @override $MovementsTable createAlias(String alias) { return $MovementsTable(attachedDatabase, alias); } static JsonTypeConverter2 $convertertype = const EnumNameConverter(MovementType.values); } class Movement extends DataClass implements Insertable { final String id; final int createdAt; final String lastAuthor; final int schemaRowVersion; final String lotId; final MovementType type; final int? occurredOn; final String? counterpartyId; final String? quantityKind; final double? quantityPrecise; final String? quantityLabel; final String? parentMovementId; final String? plantareId; final String? notes; const Movement({ required this.id, required this.createdAt, required this.lastAuthor, required this.schemaRowVersion, required this.lotId, required this.type, this.occurredOn, this.counterpartyId, this.quantityKind, this.quantityPrecise, this.quantityLabel, this.parentMovementId, this.plantareId, this.notes, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['last_author'] = Variable(lastAuthor); map['schema_row_version'] = Variable(schemaRowVersion); map['lot_id'] = Variable(lotId); { map['type'] = Variable( $MovementsTable.$convertertype.toSql(type), ); } if (!nullToAbsent || occurredOn != null) { map['occurred_on'] = Variable(occurredOn); } if (!nullToAbsent || counterpartyId != null) { map['counterparty_id'] = Variable(counterpartyId); } if (!nullToAbsent || quantityKind != null) { map['quantity_kind'] = Variable(quantityKind); } if (!nullToAbsent || quantityPrecise != null) { map['quantity_precise'] = Variable(quantityPrecise); } if (!nullToAbsent || quantityLabel != null) { map['quantity_label'] = Variable(quantityLabel); } if (!nullToAbsent || parentMovementId != null) { map['parent_movement_id'] = Variable(parentMovementId); } if (!nullToAbsent || plantareId != null) { map['plantare_id'] = Variable(plantareId); } if (!nullToAbsent || notes != null) { map['notes'] = Variable(notes); } return map; } MovementsCompanion toCompanion(bool nullToAbsent) { return MovementsCompanion( id: Value(id), createdAt: Value(createdAt), lastAuthor: Value(lastAuthor), schemaRowVersion: Value(schemaRowVersion), lotId: Value(lotId), type: Value(type), occurredOn: occurredOn == null && nullToAbsent ? const Value.absent() : Value(occurredOn), counterpartyId: counterpartyId == null && nullToAbsent ? const Value.absent() : Value(counterpartyId), quantityKind: quantityKind == null && nullToAbsent ? const Value.absent() : Value(quantityKind), quantityPrecise: quantityPrecise == null && nullToAbsent ? const Value.absent() : Value(quantityPrecise), quantityLabel: quantityLabel == null && nullToAbsent ? const Value.absent() : Value(quantityLabel), parentMovementId: parentMovementId == null && nullToAbsent ? const Value.absent() : Value(parentMovementId), plantareId: plantareId == null && nullToAbsent ? const Value.absent() : Value(plantareId), notes: notes == null && nullToAbsent ? const Value.absent() : Value(notes), ); } factory Movement.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Movement( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), lotId: serializer.fromJson(json['lotId']), type: $MovementsTable.$convertertype.fromJson( serializer.fromJson(json['type']), ), occurredOn: serializer.fromJson(json['occurredOn']), counterpartyId: serializer.fromJson(json['counterpartyId']), quantityKind: serializer.fromJson(json['quantityKind']), quantityPrecise: serializer.fromJson(json['quantityPrecise']), quantityLabel: serializer.fromJson(json['quantityLabel']), parentMovementId: serializer.fromJson(json['parentMovementId']), plantareId: serializer.fromJson(json['plantareId']), notes: serializer.fromJson(json['notes']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'lastAuthor': serializer.toJson(lastAuthor), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'lotId': serializer.toJson(lotId), 'type': serializer.toJson( $MovementsTable.$convertertype.toJson(type), ), 'occurredOn': serializer.toJson(occurredOn), 'counterpartyId': serializer.toJson(counterpartyId), 'quantityKind': serializer.toJson(quantityKind), 'quantityPrecise': serializer.toJson(quantityPrecise), 'quantityLabel': serializer.toJson(quantityLabel), 'parentMovementId': serializer.toJson(parentMovementId), 'plantareId': serializer.toJson(plantareId), 'notes': serializer.toJson(notes), }; } Movement copyWith({ String? id, int? createdAt, String? lastAuthor, int? schemaRowVersion, String? lotId, MovementType? type, Value occurredOn = const Value.absent(), Value counterpartyId = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value parentMovementId = const Value.absent(), Value plantareId = const Value.absent(), Value notes = const Value.absent(), }) => Movement( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, lastAuthor: lastAuthor ?? this.lastAuthor, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, type: type ?? this.type, occurredOn: occurredOn.present ? occurredOn.value : this.occurredOn, counterpartyId: counterpartyId.present ? counterpartyId.value : this.counterpartyId, quantityKind: quantityKind.present ? quantityKind.value : this.quantityKind, quantityPrecise: quantityPrecise.present ? quantityPrecise.value : this.quantityPrecise, quantityLabel: quantityLabel.present ? quantityLabel.value : this.quantityLabel, parentMovementId: parentMovementId.present ? parentMovementId.value : this.parentMovementId, plantareId: plantareId.present ? plantareId.value : this.plantareId, notes: notes.present ? notes.value : this.notes, ); Movement copyWithCompanion(MovementsCompanion data) { return Movement( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, lotId: data.lotId.present ? data.lotId.value : this.lotId, type: data.type.present ? data.type.value : this.type, occurredOn: data.occurredOn.present ? data.occurredOn.value : this.occurredOn, counterpartyId: data.counterpartyId.present ? data.counterpartyId.value : this.counterpartyId, quantityKind: data.quantityKind.present ? data.quantityKind.value : this.quantityKind, quantityPrecise: data.quantityPrecise.present ? data.quantityPrecise.value : this.quantityPrecise, quantityLabel: data.quantityLabel.present ? data.quantityLabel.value : this.quantityLabel, parentMovementId: data.parentMovementId.present ? data.parentMovementId.value : this.parentMovementId, plantareId: data.plantareId.present ? data.plantareId.value : this.plantareId, notes: data.notes.present ? data.notes.value : this.notes, ); } @override String toString() { return (StringBuffer('Movement(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('type: $type, ') ..write('occurredOn: $occurredOn, ') ..write('counterpartyId: $counterpartyId, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('parentMovementId: $parentMovementId, ') ..write('plantareId: $plantareId, ') ..write('notes: $notes') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, lastAuthor, schemaRowVersion, lotId, type, occurredOn, counterpartyId, quantityKind, quantityPrecise, quantityLabel, parentMovementId, plantareId, notes, ); @override bool operator ==(Object other) => identical(this, other) || (other is Movement && other.id == this.id && other.createdAt == this.createdAt && other.lastAuthor == this.lastAuthor && other.schemaRowVersion == this.schemaRowVersion && other.lotId == this.lotId && other.type == this.type && other.occurredOn == this.occurredOn && other.counterpartyId == this.counterpartyId && other.quantityKind == this.quantityKind && other.quantityPrecise == this.quantityPrecise && other.quantityLabel == this.quantityLabel && other.parentMovementId == this.parentMovementId && other.plantareId == this.plantareId && other.notes == this.notes); } class MovementsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value lastAuthor; final Value schemaRowVersion; final Value lotId; final Value type; final Value occurredOn; final Value counterpartyId; final Value quantityKind; final Value quantityPrecise; final Value quantityLabel; final Value parentMovementId; final Value plantareId; final Value notes; final Value rowid; const MovementsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.lotId = const Value.absent(), this.type = const Value.absent(), this.occurredOn = const Value.absent(), this.counterpartyId = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.parentMovementId = const Value.absent(), this.plantareId = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }); MovementsCompanion.insert({ required String id, required int createdAt, required String lastAuthor, this.schemaRowVersion = const Value.absent(), required String lotId, required MovementType type, this.occurredOn = const Value.absent(), this.counterpartyId = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.parentMovementId = const Value.absent(), this.plantareId = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), lastAuthor = Value(lastAuthor), lotId = Value(lotId), type = Value(type); static Insertable custom({ Expression? id, Expression? createdAt, Expression? lastAuthor, Expression? schemaRowVersion, Expression? lotId, Expression? type, Expression? occurredOn, Expression? counterpartyId, Expression? quantityKind, Expression? quantityPrecise, Expression? quantityLabel, Expression? parentMovementId, Expression? plantareId, Expression? notes, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (lastAuthor != null) 'last_author': lastAuthor, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (lotId != null) 'lot_id': lotId, if (type != null) 'type': type, if (occurredOn != null) 'occurred_on': occurredOn, if (counterpartyId != null) 'counterparty_id': counterpartyId, if (quantityKind != null) 'quantity_kind': quantityKind, if (quantityPrecise != null) 'quantity_precise': quantityPrecise, if (quantityLabel != null) 'quantity_label': quantityLabel, if (parentMovementId != null) 'parent_movement_id': parentMovementId, if (plantareId != null) 'plantare_id': plantareId, if (notes != null) 'notes': notes, if (rowid != null) 'rowid': rowid, }); } MovementsCompanion copyWith({ Value? id, Value? createdAt, Value? lastAuthor, Value? schemaRowVersion, Value? lotId, Value? type, Value? occurredOn, Value? counterpartyId, Value? quantityKind, Value? quantityPrecise, Value? quantityLabel, Value? parentMovementId, Value? plantareId, Value? notes, Value? rowid, }) { return MovementsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, lastAuthor: lastAuthor ?? this.lastAuthor, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, type: type ?? this.type, occurredOn: occurredOn ?? this.occurredOn, counterpartyId: counterpartyId ?? this.counterpartyId, quantityKind: quantityKind ?? this.quantityKind, quantityPrecise: quantityPrecise ?? this.quantityPrecise, quantityLabel: quantityLabel ?? this.quantityLabel, parentMovementId: parentMovementId ?? this.parentMovementId, plantareId: plantareId ?? this.plantareId, notes: notes ?? this.notes, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (lotId.present) { map['lot_id'] = Variable(lotId.value); } if (type.present) { map['type'] = Variable( $MovementsTable.$convertertype.toSql(type.value), ); } if (occurredOn.present) { map['occurred_on'] = Variable(occurredOn.value); } if (counterpartyId.present) { map['counterparty_id'] = Variable(counterpartyId.value); } if (quantityKind.present) { map['quantity_kind'] = Variable(quantityKind.value); } if (quantityPrecise.present) { map['quantity_precise'] = Variable(quantityPrecise.value); } if (quantityLabel.present) { map['quantity_label'] = Variable(quantityLabel.value); } if (parentMovementId.present) { map['parent_movement_id'] = Variable(parentMovementId.value); } if (plantareId.present) { map['plantare_id'] = Variable(plantareId.value); } if (notes.present) { map['notes'] = Variable(notes.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('MovementsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('type: $type, ') ..write('occurredOn: $occurredOn, ') ..write('counterpartyId: $counterpartyId, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('parentMovementId: $parentMovementId, ') ..write('plantareId: $plantareId, ') ..write('notes: $notes, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $PartiesTable extends Parties with TableInfo<$PartiesTable, Party> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PartiesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _displayNameMeta = const VerificationMeta( 'displayName', ); @override late final GeneratedColumn displayName = GeneratedColumn( 'display_name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _publicKeyMeta = const VerificationMeta( 'publicKey', ); @override late final GeneratedColumn publicKey = GeneratedColumn( 'public_key', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter kind = GeneratedColumn( 'kind', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('person'), ).withConverter($PartiesTable.$converterkind); static const VerificationMeta _noteMeta = const VerificationMeta('note'); @override late final GeneratedColumn note = GeneratedColumn( 'note', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, displayName, publicKey, kind, note, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'parties'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('display_name')) { context.handle( _displayNameMeta, displayName.isAcceptableOrUnknown( data['display_name']!, _displayNameMeta, ), ); } else if (isInserting) { context.missing(_displayNameMeta); } if (data.containsKey('public_key')) { context.handle( _publicKeyMeta, publicKey.isAcceptableOrUnknown(data['public_key']!, _publicKeyMeta), ); } if (data.containsKey('note')) { context.handle( _noteMeta, note.isAcceptableOrUnknown(data['note']!, _noteMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Party map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Party( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, displayName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}display_name'], )!, publicKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}public_key'], ), kind: $PartiesTable.$converterkind.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}kind'], )!, ), note: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}note'], ), ); } @override $PartiesTable createAlias(String alias) { return $PartiesTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterkind = const EnumNameConverter(PartyKind.values); } class Party extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String displayName; final String? publicKey; final PartyKind kind; final String? note; const Party({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.displayName, this.publicKey, required this.kind, this.note, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['display_name'] = Variable(displayName); if (!nullToAbsent || publicKey != null) { map['public_key'] = Variable(publicKey); } { map['kind'] = Variable($PartiesTable.$converterkind.toSql(kind)); } if (!nullToAbsent || note != null) { map['note'] = Variable(note); } return map; } PartiesCompanion toCompanion(bool nullToAbsent) { return PartiesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), displayName: Value(displayName), publicKey: publicKey == null && nullToAbsent ? const Value.absent() : Value(publicKey), kind: Value(kind), note: note == null && nullToAbsent ? const Value.absent() : Value(note), ); } factory Party.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Party( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), displayName: serializer.fromJson(json['displayName']), publicKey: serializer.fromJson(json['publicKey']), kind: $PartiesTable.$converterkind.fromJson( serializer.fromJson(json['kind']), ), note: serializer.fromJson(json['note']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'displayName': serializer.toJson(displayName), 'publicKey': serializer.toJson(publicKey), 'kind': serializer.toJson( $PartiesTable.$converterkind.toJson(kind), ), 'note': serializer.toJson(note), }; } Party copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? displayName, Value publicKey = const Value.absent(), PartyKind? kind, Value note = const Value.absent(), }) => Party( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, displayName: displayName ?? this.displayName, publicKey: publicKey.present ? publicKey.value : this.publicKey, kind: kind ?? this.kind, note: note.present ? note.value : this.note, ); Party copyWithCompanion(PartiesCompanion data) { return Party( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, displayName: data.displayName.present ? data.displayName.value : this.displayName, publicKey: data.publicKey.present ? data.publicKey.value : this.publicKey, kind: data.kind.present ? data.kind.value : this.kind, note: data.note.present ? data.note.value : this.note, ); } @override String toString() { return (StringBuffer('Party(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('displayName: $displayName, ') ..write('publicKey: $publicKey, ') ..write('kind: $kind, ') ..write('note: $note') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, displayName, publicKey, kind, note, ); @override bool operator ==(Object other) => identical(this, other) || (other is Party && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.displayName == this.displayName && other.publicKey == this.publicKey && other.kind == this.kind && other.note == this.note); } class PartiesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value displayName; final Value publicKey; final Value kind; final Value note; final Value rowid; const PartiesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.displayName = const Value.absent(), this.publicKey = const Value.absent(), this.kind = const Value.absent(), this.note = const Value.absent(), this.rowid = const Value.absent(), }); PartiesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String displayName, this.publicKey = const Value.absent(), this.kind = const Value.absent(), this.note = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), displayName = Value(displayName); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? displayName, Expression? publicKey, Expression? kind, Expression? note, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (displayName != null) 'display_name': displayName, if (publicKey != null) 'public_key': publicKey, if (kind != null) 'kind': kind, if (note != null) 'note': note, if (rowid != null) 'rowid': rowid, }); } PartiesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? displayName, Value? publicKey, Value? kind, Value? note, Value? rowid, }) { return PartiesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, displayName: displayName ?? this.displayName, publicKey: publicKey ?? this.publicKey, kind: kind ?? this.kind, note: note ?? this.note, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (displayName.present) { map['display_name'] = Variable(displayName.value); } if (publicKey.present) { map['public_key'] = Variable(publicKey.value); } if (kind.present) { map['kind'] = Variable( $PartiesTable.$converterkind.toSql(kind.value), ); } if (note.present) { map['note'] = Variable(note.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PartiesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('displayName: $displayName, ') ..write('publicKey: $publicKey, ') ..write('kind: $kind, ') ..write('note: $note, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $AttachmentsTable extends Attachments with TableInfo<$AttachmentsTable, Attachment> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $AttachmentsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); @override late final GeneratedColumnWithTypeConverter parentType = GeneratedColumn( 'parent_type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($AttachmentsTable.$converterparentType); static const VerificationMeta _parentIdMeta = const VerificationMeta( 'parentId', ); @override late final GeneratedColumn parentId = GeneratedColumn( 'parent_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); @override late final GeneratedColumnWithTypeConverter kind = GeneratedColumn( 'kind', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($AttachmentsTable.$converterkind); static const VerificationMeta _uriMeta = const VerificationMeta('uri'); @override late final GeneratedColumn uri = GeneratedColumn( 'uri', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _bytesMeta = const VerificationMeta('bytes'); @override late final GeneratedColumn bytes = GeneratedColumn( 'bytes', aliasedName, true, type: DriftSqlType.blob, requiredDuringInsert: false, ); static const VerificationMeta _mimeTypeMeta = const VerificationMeta( 'mimeType', ); @override late final GeneratedColumn mimeType = GeneratedColumn( 'mime_type', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, kind, uri, bytes, mimeType, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'attachments'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('parent_id')) { context.handle( _parentIdMeta, parentId.isAcceptableOrUnknown(data['parent_id']!, _parentIdMeta), ); } else if (isInserting) { context.missing(_parentIdMeta); } if (data.containsKey('uri')) { context.handle( _uriMeta, uri.isAcceptableOrUnknown(data['uri']!, _uriMeta), ); } if (data.containsKey('bytes')) { context.handle( _bytesMeta, bytes.isAcceptableOrUnknown(data['bytes']!, _bytesMeta), ); } if (data.containsKey('mime_type')) { context.handle( _mimeTypeMeta, mimeType.isAcceptableOrUnknown(data['mime_type']!, _mimeTypeMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Attachment map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Attachment( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, parentType: $AttachmentsTable.$converterparentType.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_type'], )!, ), parentId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_id'], )!, kind: $AttachmentsTable.$converterkind.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}kind'], )!, ), uri: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}uri'], ), bytes: attachedDatabase.typeMapping.read( DriftSqlType.blob, data['${effectivePrefix}bytes'], ), mimeType: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}mime_type'], ), ); } @override $AttachmentsTable createAlias(String alias) { return $AttachmentsTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterparentType = const EnumNameConverter(ParentType.values); static JsonTypeConverter2 $converterkind = const EnumNameConverter(AttachmentKind.values); } class Attachment extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final ParentType parentType; final String parentId; final AttachmentKind kind; final String? uri; final Uint8List? bytes; final String? mimeType; const Attachment({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.parentType, required this.parentId, required this.kind, this.uri, this.bytes, this.mimeType, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); { map['parent_type'] = Variable( $AttachmentsTable.$converterparentType.toSql(parentType), ); } map['parent_id'] = Variable(parentId); { map['kind'] = Variable( $AttachmentsTable.$converterkind.toSql(kind), ); } if (!nullToAbsent || uri != null) { map['uri'] = Variable(uri); } if (!nullToAbsent || bytes != null) { map['bytes'] = Variable(bytes); } if (!nullToAbsent || mimeType != null) { map['mime_type'] = Variable(mimeType); } return map; } AttachmentsCompanion toCompanion(bool nullToAbsent) { return AttachmentsCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), parentType: Value(parentType), parentId: Value(parentId), kind: Value(kind), uri: uri == null && nullToAbsent ? const Value.absent() : Value(uri), bytes: bytes == null && nullToAbsent ? const Value.absent() : Value(bytes), mimeType: mimeType == null && nullToAbsent ? const Value.absent() : Value(mimeType), ); } factory Attachment.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Attachment( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), parentType: $AttachmentsTable.$converterparentType.fromJson( serializer.fromJson(json['parentType']), ), parentId: serializer.fromJson(json['parentId']), kind: $AttachmentsTable.$converterkind.fromJson( serializer.fromJson(json['kind']), ), uri: serializer.fromJson(json['uri']), bytes: serializer.fromJson(json['bytes']), mimeType: serializer.fromJson(json['mimeType']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'parentType': serializer.toJson( $AttachmentsTable.$converterparentType.toJson(parentType), ), 'parentId': serializer.toJson(parentId), 'kind': serializer.toJson( $AttachmentsTable.$converterkind.toJson(kind), ), 'uri': serializer.toJson(uri), 'bytes': serializer.toJson(bytes), 'mimeType': serializer.toJson(mimeType), }; } Attachment copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, ParentType? parentType, String? parentId, AttachmentKind? kind, Value uri = const Value.absent(), Value bytes = const Value.absent(), Value mimeType = const Value.absent(), }) => Attachment( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, kind: kind ?? this.kind, uri: uri.present ? uri.value : this.uri, bytes: bytes.present ? bytes.value : this.bytes, mimeType: mimeType.present ? mimeType.value : this.mimeType, ); Attachment copyWithCompanion(AttachmentsCompanion data) { return Attachment( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, parentType: data.parentType.present ? data.parentType.value : this.parentType, parentId: data.parentId.present ? data.parentId.value : this.parentId, kind: data.kind.present ? data.kind.value : this.kind, uri: data.uri.present ? data.uri.value : this.uri, bytes: data.bytes.present ? data.bytes.value : this.bytes, mimeType: data.mimeType.present ? data.mimeType.value : this.mimeType, ); } @override String toString() { return (StringBuffer('Attachment(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('kind: $kind, ') ..write('uri: $uri, ') ..write('bytes: $bytes, ') ..write('mimeType: $mimeType') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, kind, uri, $driftBlobEquality.hash(bytes), mimeType, ); @override bool operator ==(Object other) => identical(this, other) || (other is Attachment && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.parentType == this.parentType && other.parentId == this.parentId && other.kind == this.kind && other.uri == this.uri && $driftBlobEquality.equals(other.bytes, this.bytes) && other.mimeType == this.mimeType); } class AttachmentsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value parentType; final Value parentId; final Value kind; final Value uri; final Value bytes; final Value mimeType; final Value rowid; const AttachmentsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.parentType = const Value.absent(), this.parentId = const Value.absent(), this.kind = const Value.absent(), this.uri = const Value.absent(), this.bytes = const Value.absent(), this.mimeType = const Value.absent(), this.rowid = const Value.absent(), }); AttachmentsCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required AttachmentKind kind, this.uri = const Value.absent(), this.bytes = const Value.absent(), this.mimeType = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), parentType = Value(parentType), parentId = Value(parentId), kind = Value(kind); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? parentType, Expression? parentId, Expression? kind, Expression? uri, Expression? bytes, Expression? mimeType, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (parentType != null) 'parent_type': parentType, if (parentId != null) 'parent_id': parentId, if (kind != null) 'kind': kind, if (uri != null) 'uri': uri, if (bytes != null) 'bytes': bytes, if (mimeType != null) 'mime_type': mimeType, if (rowid != null) 'rowid': rowid, }); } AttachmentsCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? parentType, Value? parentId, Value? kind, Value? uri, Value? bytes, Value? mimeType, Value? rowid, }) { return AttachmentsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, kind: kind ?? this.kind, uri: uri ?? this.uri, bytes: bytes ?? this.bytes, mimeType: mimeType ?? this.mimeType, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (parentType.present) { map['parent_type'] = Variable( $AttachmentsTable.$converterparentType.toSql(parentType.value), ); } if (parentId.present) { map['parent_id'] = Variable(parentId.value); } if (kind.present) { map['kind'] = Variable( $AttachmentsTable.$converterkind.toSql(kind.value), ); } if (uri.present) { map['uri'] = Variable(uri.value); } if (bytes.present) { map['bytes'] = Variable(bytes.value); } if (mimeType.present) { map['mime_type'] = Variable(mimeType.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('AttachmentsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('kind: $kind, ') ..write('uri: $uri, ') ..write('bytes: $bytes, ') ..write('mimeType: $mimeType, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $ExternalLinksTable extends ExternalLinks with TableInfo<$ExternalLinksTable, ExternalLink> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ExternalLinksTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); @override late final GeneratedColumnWithTypeConverter parentType = GeneratedColumn( 'parent_type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($ExternalLinksTable.$converterparentType); static const VerificationMeta _parentIdMeta = const VerificationMeta( 'parentId', ); @override late final GeneratedColumn parentId = GeneratedColumn( 'parent_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _urlMeta = const VerificationMeta('url'); @override late final GeneratedColumn url = GeneratedColumn( 'url', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _titleMeta = const VerificationMeta('title'); @override late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, url, title, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'external_links'; @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)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('parent_id')) { context.handle( _parentIdMeta, parentId.isAcceptableOrUnknown(data['parent_id']!, _parentIdMeta), ); } else if (isInserting) { context.missing(_parentIdMeta); } if (data.containsKey('url')) { context.handle( _urlMeta, url.isAcceptableOrUnknown(data['url']!, _urlMeta), ); } else if (isInserting) { context.missing(_urlMeta); } if (data.containsKey('title')) { context.handle( _titleMeta, title.isAcceptableOrUnknown(data['title']!, _titleMeta), ); } return context; } @override Set get $primaryKey => {id}; @override ExternalLink map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ExternalLink( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, parentType: $ExternalLinksTable.$converterparentType.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_type'], )!, ), parentId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_id'], )!, url: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}url'], )!, title: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}title'], ), ); } @override $ExternalLinksTable createAlias(String alias) { return $ExternalLinksTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterparentType = const EnumNameConverter(ParentType.values); } class ExternalLink extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final ParentType parentType; final String parentId; final String url; final String? title; const ExternalLink({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.parentType, required this.parentId, required this.url, this.title, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); { map['parent_type'] = Variable( $ExternalLinksTable.$converterparentType.toSql(parentType), ); } map['parent_id'] = Variable(parentId); map['url'] = Variable(url); if (!nullToAbsent || title != null) { map['title'] = Variable(title); } return map; } ExternalLinksCompanion toCompanion(bool nullToAbsent) { return ExternalLinksCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), parentType: Value(parentType), parentId: Value(parentId), url: Value(url), title: title == null && nullToAbsent ? const Value.absent() : Value(title), ); } factory ExternalLink.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ExternalLink( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), parentType: $ExternalLinksTable.$converterparentType.fromJson( serializer.fromJson(json['parentType']), ), parentId: serializer.fromJson(json['parentId']), url: serializer.fromJson(json['url']), title: serializer.fromJson(json['title']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'parentType': serializer.toJson( $ExternalLinksTable.$converterparentType.toJson(parentType), ), 'parentId': serializer.toJson(parentId), 'url': serializer.toJson(url), 'title': serializer.toJson(title), }; } ExternalLink copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, ParentType? parentType, String? parentId, String? url, Value title = const Value.absent(), }) => ExternalLink( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, url: url ?? this.url, title: title.present ? title.value : this.title, ); ExternalLink copyWithCompanion(ExternalLinksCompanion data) { return ExternalLink( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, parentType: data.parentType.present ? data.parentType.value : this.parentType, parentId: data.parentId.present ? data.parentId.value : this.parentId, url: data.url.present ? data.url.value : this.url, title: data.title.present ? data.title.value : this.title, ); } @override String toString() { return (StringBuffer('ExternalLink(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('url: $url, ') ..write('title: $title') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, url, title, ); @override bool operator ==(Object other) => identical(this, other) || (other is ExternalLink && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.parentType == this.parentType && other.parentId == this.parentId && other.url == this.url && other.title == this.title); } class ExternalLinksCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value parentType; final Value parentId; final Value url; final Value title; final Value rowid; const ExternalLinksCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.parentType = const Value.absent(), this.parentId = const Value.absent(), this.url = const Value.absent(), this.title = const Value.absent(), this.rowid = const Value.absent(), }); ExternalLinksCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required String url, this.title = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), parentType = Value(parentType), parentId = Value(parentId), url = Value(url); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? parentType, Expression? parentId, Expression? url, Expression? title, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (parentType != null) 'parent_type': parentType, if (parentId != null) 'parent_id': parentId, if (url != null) 'url': url, if (title != null) 'title': title, if (rowid != null) 'rowid': rowid, }); } ExternalLinksCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? parentType, Value? parentId, Value? url, Value? title, Value? rowid, }) { return ExternalLinksCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, url: url ?? this.url, title: title ?? this.title, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (parentType.present) { map['parent_type'] = Variable( $ExternalLinksTable.$converterparentType.toSql(parentType.value), ); } if (parentId.present) { map['parent_id'] = Variable(parentId.value); } if (url.present) { map['url'] = Variable(url.value); } if (title.present) { map['title'] = Variable(title.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ExternalLinksCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('url: $url, ') ..write('title: $title, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); $AppDatabaseManager get managers => $AppDatabaseManager(this); late final $VarietiesTable varieties = $VarietiesTable(this); late final $VarietyVernacularNamesTable varietyVernacularNames = $VarietyVernacularNamesTable(this); late final $SpeciesTable species = $SpeciesTable(this); late final $SpeciesCommonNamesTable speciesCommonNames = $SpeciesCommonNamesTable(this); late final $LotsTable lots = $LotsTable(this); late final $GerminationTestsTable germinationTests = $GerminationTestsTable( this, ); late final $MovementsTable movements = $MovementsTable(this); late final $PartiesTable parties = $PartiesTable(this); late final $AttachmentsTable attachments = $AttachmentsTable(this); late final $ExternalLinksTable externalLinks = $ExternalLinksTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ varieties, varietyVernacularNames, species, speciesCommonNames, lots, germinationTests, movements, parties, attachments, externalLinks, ]; } typedef $$VarietiesTableCreateCompanionBuilder = VarietiesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String label, Value speciesId, Value cultivarName, Value category, Value notes, Value rowid, }); typedef $$VarietiesTableUpdateCompanionBuilder = VarietiesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value label, Value speciesId, Value cultivarName, Value category, Value notes, Value rowid, }); class $$VarietiesTableFilterComposer extends Composer<_$AppDatabase, $VarietiesTable> { $$VarietiesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get label => $composableBuilder( column: $table.label, builder: (column) => ColumnFilters(column), ); ColumnFilters get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnFilters(column), ); ColumnFilters get cultivarName => $composableBuilder( column: $table.cultivarName, builder: (column) => ColumnFilters(column), ); ColumnFilters get category => $composableBuilder( column: $table.category, builder: (column) => ColumnFilters(column), ); ColumnFilters get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnFilters(column), ); } class $$VarietiesTableOrderingComposer extends Composer<_$AppDatabase, $VarietiesTable> { $$VarietiesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get label => $composableBuilder( column: $table.label, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get cultivarName => $composableBuilder( column: $table.cultivarName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get category => $composableBuilder( column: $table.category, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnOrderings(column), ); } class $$VarietiesTableAnnotationComposer extends Composer<_$AppDatabase, $VarietiesTable> { $$VarietiesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get label => $composableBuilder(column: $table.label, builder: (column) => column); GeneratedColumn get speciesId => $composableBuilder(column: $table.speciesId, builder: (column) => column); GeneratedColumn get cultivarName => $composableBuilder( column: $table.cultivarName, builder: (column) => column, ); GeneratedColumn get category => $composableBuilder(column: $table.category, builder: (column) => column); GeneratedColumn get notes => $composableBuilder(column: $table.notes, builder: (column) => column); } class $$VarietiesTableTableManager extends RootTableManager< _$AppDatabase, $VarietiesTable, Variety, $$VarietiesTableFilterComposer, $$VarietiesTableOrderingComposer, $$VarietiesTableAnnotationComposer, $$VarietiesTableCreateCompanionBuilder, $$VarietiesTableUpdateCompanionBuilder, (Variety, BaseReferences<_$AppDatabase, $VarietiesTable, Variety>), Variety, PrefetchHooks Function() > { $$VarietiesTableTableManager(_$AppDatabase db, $VarietiesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$VarietiesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$VarietiesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$VarietiesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value label = const Value.absent(), Value speciesId = const Value.absent(), Value cultivarName = const Value.absent(), Value category = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => VarietiesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, label: label, speciesId: speciesId, cultivarName: cultivarName, category: category, notes: notes, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String label, Value speciesId = const Value.absent(), Value cultivarName = const Value.absent(), Value category = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => VarietiesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, label: label, speciesId: speciesId, cultivarName: cultivarName, category: category, notes: notes, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$VarietiesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $VarietiesTable, Variety, $$VarietiesTableFilterComposer, $$VarietiesTableOrderingComposer, $$VarietiesTableAnnotationComposer, $$VarietiesTableCreateCompanionBuilder, $$VarietiesTableUpdateCompanionBuilder, (Variety, BaseReferences<_$AppDatabase, $VarietiesTable, Variety>), Variety, PrefetchHooks Function() >; typedef $$VarietyVernacularNamesTableCreateCompanionBuilder = VarietyVernacularNamesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String varietyId, required String name, Value language, Value region, Value rowid, }); typedef $$VarietyVernacularNamesTableUpdateCompanionBuilder = VarietyVernacularNamesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, Value name, Value language, Value region, Value rowid, }); class $$VarietyVernacularNamesTableFilterComposer extends Composer<_$AppDatabase, $VarietyVernacularNamesTable> { $$VarietyVernacularNamesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnFilters(column), ); ColumnFilters get name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get language => $composableBuilder( column: $table.language, builder: (column) => ColumnFilters(column), ); ColumnFilters get region => $composableBuilder( column: $table.region, builder: (column) => ColumnFilters(column), ); } class $$VarietyVernacularNamesTableOrderingComposer extends Composer<_$AppDatabase, $VarietyVernacularNamesTable> { $$VarietyVernacularNamesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get language => $composableBuilder( column: $table.language, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get region => $composableBuilder( column: $table.region, builder: (column) => ColumnOrderings(column), ); } class $$VarietyVernacularNamesTableAnnotationComposer extends Composer<_$AppDatabase, $VarietyVernacularNamesTable> { $$VarietyVernacularNamesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get varietyId => $composableBuilder(column: $table.varietyId, builder: (column) => column); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get language => $composableBuilder(column: $table.language, builder: (column) => column); GeneratedColumn get region => $composableBuilder(column: $table.region, builder: (column) => column); } class $$VarietyVernacularNamesTableTableManager extends RootTableManager< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName, $$VarietyVernacularNamesTableFilterComposer, $$VarietyVernacularNamesTableOrderingComposer, $$VarietyVernacularNamesTableAnnotationComposer, $$VarietyVernacularNamesTableCreateCompanionBuilder, $$VarietyVernacularNamesTableUpdateCompanionBuilder, ( VarietyVernacularName, BaseReferences< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName >, ), VarietyVernacularName, PrefetchHooks Function() > { $$VarietyVernacularNamesTableTableManager( _$AppDatabase db, $VarietyVernacularNamesTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$VarietyVernacularNamesTableFilterComposer( $db: db, $table: table, ), createOrderingComposer: () => $$VarietyVernacularNamesTableOrderingComposer( $db: db, $table: table, ), createComputedFieldComposer: () => $$VarietyVernacularNamesTableAnnotationComposer( $db: db, $table: table, ), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), Value name = const Value.absent(), Value language = const Value.absent(), Value region = const Value.absent(), Value rowid = const Value.absent(), }) => VarietyVernacularNamesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, name: name, language: language, region: region, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String varietyId, required String name, Value language = const Value.absent(), Value region = const Value.absent(), Value rowid = const Value.absent(), }) => VarietyVernacularNamesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, name: name, language: language, region: region, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$VarietyVernacularNamesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName, $$VarietyVernacularNamesTableFilterComposer, $$VarietyVernacularNamesTableOrderingComposer, $$VarietyVernacularNamesTableAnnotationComposer, $$VarietyVernacularNamesTableCreateCompanionBuilder, $$VarietyVernacularNamesTableUpdateCompanionBuilder, ( VarietyVernacularName, BaseReferences< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName >, ), VarietyVernacularName, PrefetchHooks Function() >; typedef $$SpeciesTableCreateCompanionBuilder = SpeciesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String scientificName, Value wikidataQid, Value gbifKey, Value family, Value isBundled, Value rowid, }); typedef $$SpeciesTableUpdateCompanionBuilder = SpeciesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value scientificName, Value wikidataQid, Value gbifKey, Value family, Value isBundled, Value rowid, }); class $$SpeciesTableFilterComposer extends Composer<_$AppDatabase, $SpeciesTable> { $$SpeciesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get scientificName => $composableBuilder( column: $table.scientificName, builder: (column) => ColumnFilters(column), ); ColumnFilters get wikidataQid => $composableBuilder( column: $table.wikidataQid, builder: (column) => ColumnFilters(column), ); ColumnFilters get gbifKey => $composableBuilder( column: $table.gbifKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get family => $composableBuilder( column: $table.family, builder: (column) => ColumnFilters(column), ); ColumnFilters get isBundled => $composableBuilder( column: $table.isBundled, builder: (column) => ColumnFilters(column), ); } class $$SpeciesTableOrderingComposer extends Composer<_$AppDatabase, $SpeciesTable> { $$SpeciesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get scientificName => $composableBuilder( column: $table.scientificName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get wikidataQid => $composableBuilder( column: $table.wikidataQid, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get gbifKey => $composableBuilder( column: $table.gbifKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get family => $composableBuilder( column: $table.family, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isBundled => $composableBuilder( column: $table.isBundled, builder: (column) => ColumnOrderings(column), ); } class $$SpeciesTableAnnotationComposer extends Composer<_$AppDatabase, $SpeciesTable> { $$SpeciesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get scientificName => $composableBuilder( column: $table.scientificName, builder: (column) => column, ); GeneratedColumn get wikidataQid => $composableBuilder( column: $table.wikidataQid, builder: (column) => column, ); GeneratedColumn get gbifKey => $composableBuilder(column: $table.gbifKey, builder: (column) => column); GeneratedColumn get family => $composableBuilder(column: $table.family, builder: (column) => column); GeneratedColumn get isBundled => $composableBuilder(column: $table.isBundled, builder: (column) => column); } class $$SpeciesTableTableManager extends RootTableManager< _$AppDatabase, $SpeciesTable, Specy, $$SpeciesTableFilterComposer, $$SpeciesTableOrderingComposer, $$SpeciesTableAnnotationComposer, $$SpeciesTableCreateCompanionBuilder, $$SpeciesTableUpdateCompanionBuilder, (Specy, BaseReferences<_$AppDatabase, $SpeciesTable, Specy>), Specy, PrefetchHooks Function() > { $$SpeciesTableTableManager(_$AppDatabase db, $SpeciesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SpeciesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SpeciesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SpeciesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value scientificName = const Value.absent(), Value wikidataQid = const Value.absent(), Value gbifKey = const Value.absent(), Value family = const Value.absent(), Value isBundled = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, scientificName: scientificName, wikidataQid: wikidataQid, gbifKey: gbifKey, family: family, isBundled: isBundled, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String scientificName, Value wikidataQid = const Value.absent(), Value gbifKey = const Value.absent(), Value family = const Value.absent(), Value isBundled = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, scientificName: scientificName, wikidataQid: wikidataQid, gbifKey: gbifKey, family: family, isBundled: isBundled, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$SpeciesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $SpeciesTable, Specy, $$SpeciesTableFilterComposer, $$SpeciesTableOrderingComposer, $$SpeciesTableAnnotationComposer, $$SpeciesTableCreateCompanionBuilder, $$SpeciesTableUpdateCompanionBuilder, (Specy, BaseReferences<_$AppDatabase, $SpeciesTable, Specy>), Specy, PrefetchHooks Function() >; typedef $$SpeciesCommonNamesTableCreateCompanionBuilder = SpeciesCommonNamesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String speciesId, required String name, Value language, Value rowid, }); typedef $$SpeciesCommonNamesTableUpdateCompanionBuilder = SpeciesCommonNamesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value speciesId, Value name, Value language, Value rowid, }); class $$SpeciesCommonNamesTableFilterComposer extends Composer<_$AppDatabase, $SpeciesCommonNamesTable> { $$SpeciesCommonNamesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnFilters(column), ); ColumnFilters get name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get language => $composableBuilder( column: $table.language, builder: (column) => ColumnFilters(column), ); } class $$SpeciesCommonNamesTableOrderingComposer extends Composer<_$AppDatabase, $SpeciesCommonNamesTable> { $$SpeciesCommonNamesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get language => $composableBuilder( column: $table.language, builder: (column) => ColumnOrderings(column), ); } class $$SpeciesCommonNamesTableAnnotationComposer extends Composer<_$AppDatabase, $SpeciesCommonNamesTable> { $$SpeciesCommonNamesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get speciesId => $composableBuilder(column: $table.speciesId, builder: (column) => column); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get language => $composableBuilder(column: $table.language, builder: (column) => column); } class $$SpeciesCommonNamesTableTableManager extends RootTableManager< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName, $$SpeciesCommonNamesTableFilterComposer, $$SpeciesCommonNamesTableOrderingComposer, $$SpeciesCommonNamesTableAnnotationComposer, $$SpeciesCommonNamesTableCreateCompanionBuilder, $$SpeciesCommonNamesTableUpdateCompanionBuilder, ( SpeciesCommonName, BaseReferences< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName >, ), SpeciesCommonName, PrefetchHooks Function() > { $$SpeciesCommonNamesTableTableManager( _$AppDatabase db, $SpeciesCommonNamesTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SpeciesCommonNamesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SpeciesCommonNamesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SpeciesCommonNamesTableAnnotationComposer( $db: db, $table: table, ), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value speciesId = const Value.absent(), Value name = const Value.absent(), Value language = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCommonNamesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, speciesId: speciesId, name: name, language: language, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String speciesId, required String name, Value language = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCommonNamesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, speciesId: speciesId, name: name, language: language, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$SpeciesCommonNamesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName, $$SpeciesCommonNamesTableFilterComposer, $$SpeciesCommonNamesTableOrderingComposer, $$SpeciesCommonNamesTableAnnotationComposer, $$SpeciesCommonNamesTableCreateCompanionBuilder, $$SpeciesCommonNamesTableUpdateCompanionBuilder, ( SpeciesCommonName, BaseReferences< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName >, ), SpeciesCommonName, PrefetchHooks Function() >; typedef $$LotsTableCreateCompanionBuilder = LotsCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String varietyId, Value harvestYear, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value storageLocation, Value offerStatus, Value seedbankId, Value rowid, }); typedef $$LotsTableUpdateCompanionBuilder = LotsCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, Value harvestYear, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value storageLocation, Value offerStatus, Value seedbankId, Value rowid, }); class $$LotsTableFilterComposer extends Composer<_$AppDatabase, $LotsTable> { $$LotsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnFilters(column), ); ColumnFilters get harvestYear => $composableBuilder( column: $table.harvestYear, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnFilters(column), ); ColumnFilters get storageLocation => $composableBuilder( column: $table.storageLocation, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get offerStatus => $composableBuilder( column: $table.offerStatus, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get seedbankId => $composableBuilder( column: $table.seedbankId, builder: (column) => ColumnFilters(column), ); } class $$LotsTableOrderingComposer extends Composer<_$AppDatabase, $LotsTable> { $$LotsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get harvestYear => $composableBuilder( column: $table.harvestYear, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get storageLocation => $composableBuilder( column: $table.storageLocation, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get offerStatus => $composableBuilder( column: $table.offerStatus, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get seedbankId => $composableBuilder( column: $table.seedbankId, builder: (column) => ColumnOrderings(column), ); } class $$LotsTableAnnotationComposer extends Composer<_$AppDatabase, $LotsTable> { $$LotsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get varietyId => $composableBuilder(column: $table.varietyId, builder: (column) => column); GeneratedColumn get harvestYear => $composableBuilder( column: $table.harvestYear, builder: (column) => column, ); GeneratedColumn get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => column, ); GeneratedColumn get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => column, ); GeneratedColumn get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => column, ); GeneratedColumn get storageLocation => $composableBuilder( column: $table.storageLocation, builder: (column) => column, ); GeneratedColumnWithTypeConverter get offerStatus => $composableBuilder( column: $table.offerStatus, builder: (column) => column, ); GeneratedColumn get seedbankId => $composableBuilder( column: $table.seedbankId, builder: (column) => column, ); } class $$LotsTableTableManager extends RootTableManager< _$AppDatabase, $LotsTable, Lot, $$LotsTableFilterComposer, $$LotsTableOrderingComposer, $$LotsTableAnnotationComposer, $$LotsTableCreateCompanionBuilder, $$LotsTableUpdateCompanionBuilder, (Lot, BaseReferences<_$AppDatabase, $LotsTable, Lot>), Lot, PrefetchHooks Function() > { $$LotsTableTableManager(_$AppDatabase db, $LotsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$LotsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$LotsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$LotsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), Value harvestYear = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value storageLocation = const Value.absent(), Value offerStatus = const Value.absent(), Value seedbankId = const Value.absent(), Value rowid = const Value.absent(), }) => LotsCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, harvestYear: harvestYear, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, storageLocation: storageLocation, offerStatus: offerStatus, seedbankId: seedbankId, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String varietyId, Value harvestYear = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value storageLocation = const Value.absent(), Value offerStatus = const Value.absent(), Value seedbankId = const Value.absent(), Value rowid = const Value.absent(), }) => LotsCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, harvestYear: harvestYear, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, storageLocation: storageLocation, offerStatus: offerStatus, seedbankId: seedbankId, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$LotsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $LotsTable, Lot, $$LotsTableFilterComposer, $$LotsTableOrderingComposer, $$LotsTableAnnotationComposer, $$LotsTableCreateCompanionBuilder, $$LotsTableUpdateCompanionBuilder, (Lot, BaseReferences<_$AppDatabase, $LotsTable, Lot>), Lot, PrefetchHooks Function() >; typedef $$GerminationTestsTableCreateCompanionBuilder = GerminationTestsCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String lotId, Value testedOn, Value sampleSize, Value germinatedCount, Value notes, Value rowid, }); typedef $$GerminationTestsTableUpdateCompanionBuilder = GerminationTestsCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value lotId, Value testedOn, Value sampleSize, Value germinatedCount, Value notes, Value rowid, }); class $$GerminationTestsTableFilterComposer extends Composer<_$AppDatabase, $GerminationTestsTable> { $$GerminationTestsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnFilters(column), ); ColumnFilters get testedOn => $composableBuilder( column: $table.testedOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get sampleSize => $composableBuilder( column: $table.sampleSize, builder: (column) => ColumnFilters(column), ); ColumnFilters get germinatedCount => $composableBuilder( column: $table.germinatedCount, builder: (column) => ColumnFilters(column), ); ColumnFilters get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnFilters(column), ); } class $$GerminationTestsTableOrderingComposer extends Composer<_$AppDatabase, $GerminationTestsTable> { $$GerminationTestsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get testedOn => $composableBuilder( column: $table.testedOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get sampleSize => $composableBuilder( column: $table.sampleSize, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get germinatedCount => $composableBuilder( column: $table.germinatedCount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnOrderings(column), ); } class $$GerminationTestsTableAnnotationComposer extends Composer<_$AppDatabase, $GerminationTestsTable> { $$GerminationTestsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get lotId => $composableBuilder(column: $table.lotId, builder: (column) => column); GeneratedColumn get testedOn => $composableBuilder(column: $table.testedOn, builder: (column) => column); GeneratedColumn get sampleSize => $composableBuilder( column: $table.sampleSize, builder: (column) => column, ); GeneratedColumn get germinatedCount => $composableBuilder( column: $table.germinatedCount, builder: (column) => column, ); GeneratedColumn get notes => $composableBuilder(column: $table.notes, builder: (column) => column); } class $$GerminationTestsTableTableManager extends RootTableManager< _$AppDatabase, $GerminationTestsTable, GerminationTest, $$GerminationTestsTableFilterComposer, $$GerminationTestsTableOrderingComposer, $$GerminationTestsTableAnnotationComposer, $$GerminationTestsTableCreateCompanionBuilder, $$GerminationTestsTableUpdateCompanionBuilder, ( GerminationTest, BaseReferences< _$AppDatabase, $GerminationTestsTable, GerminationTest >, ), GerminationTest, PrefetchHooks Function() > { $$GerminationTestsTableTableManager( _$AppDatabase db, $GerminationTestsTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$GerminationTestsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$GerminationTestsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$GerminationTestsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value lotId = const Value.absent(), Value testedOn = const Value.absent(), Value sampleSize = const Value.absent(), Value germinatedCount = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => GerminationTestsCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, lotId: lotId, testedOn: testedOn, sampleSize: sampleSize, germinatedCount: germinatedCount, notes: notes, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String lotId, Value testedOn = const Value.absent(), Value sampleSize = const Value.absent(), Value germinatedCount = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => GerminationTestsCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, lotId: lotId, testedOn: testedOn, sampleSize: sampleSize, germinatedCount: germinatedCount, notes: notes, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$GerminationTestsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $GerminationTestsTable, GerminationTest, $$GerminationTestsTableFilterComposer, $$GerminationTestsTableOrderingComposer, $$GerminationTestsTableAnnotationComposer, $$GerminationTestsTableCreateCompanionBuilder, $$GerminationTestsTableUpdateCompanionBuilder, ( GerminationTest, BaseReferences<_$AppDatabase, $GerminationTestsTable, GerminationTest>, ), GerminationTest, PrefetchHooks Function() >; typedef $$MovementsTableCreateCompanionBuilder = MovementsCompanion Function({ required String id, required int createdAt, required String lastAuthor, Value schemaRowVersion, required String lotId, required MovementType type, Value occurredOn, Value counterpartyId, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value parentMovementId, Value plantareId, Value notes, Value rowid, }); typedef $$MovementsTableUpdateCompanionBuilder = MovementsCompanion Function({ Value id, Value createdAt, Value lastAuthor, Value schemaRowVersion, Value lotId, Value type, Value occurredOn, Value counterpartyId, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value parentMovementId, Value plantareId, Value notes, Value rowid, }); class $$MovementsTableFilterComposer extends Composer<_$AppDatabase, $MovementsTable> { $$MovementsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get type => $composableBuilder( column: $table.type, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get occurredOn => $composableBuilder( column: $table.occurredOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get counterpartyId => $composableBuilder( column: $table.counterpartyId, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnFilters(column), ); ColumnFilters get parentMovementId => $composableBuilder( column: $table.parentMovementId, builder: (column) => ColumnFilters(column), ); ColumnFilters get plantareId => $composableBuilder( column: $table.plantareId, builder: (column) => ColumnFilters(column), ); ColumnFilters get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnFilters(column), ); } class $$MovementsTableOrderingComposer extends Composer<_$AppDatabase, $MovementsTable> { $$MovementsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get type => $composableBuilder( column: $table.type, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get occurredOn => $composableBuilder( column: $table.occurredOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get counterpartyId => $composableBuilder( column: $table.counterpartyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentMovementId => $composableBuilder( column: $table.parentMovementId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get plantareId => $composableBuilder( column: $table.plantareId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnOrderings(column), ); } class $$MovementsTableAnnotationComposer extends Composer<_$AppDatabase, $MovementsTable> { $$MovementsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get lotId => $composableBuilder(column: $table.lotId, builder: (column) => column); GeneratedColumnWithTypeConverter get type => $composableBuilder(column: $table.type, builder: (column) => column); GeneratedColumn get occurredOn => $composableBuilder( column: $table.occurredOn, builder: (column) => column, ); GeneratedColumn get counterpartyId => $composableBuilder( column: $table.counterpartyId, builder: (column) => column, ); GeneratedColumn get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => column, ); GeneratedColumn get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => column, ); GeneratedColumn get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => column, ); GeneratedColumn get parentMovementId => $composableBuilder( column: $table.parentMovementId, builder: (column) => column, ); GeneratedColumn get plantareId => $composableBuilder( column: $table.plantareId, builder: (column) => column, ); GeneratedColumn get notes => $composableBuilder(column: $table.notes, builder: (column) => column); } class $$MovementsTableTableManager extends RootTableManager< _$AppDatabase, $MovementsTable, Movement, $$MovementsTableFilterComposer, $$MovementsTableOrderingComposer, $$MovementsTableAnnotationComposer, $$MovementsTableCreateCompanionBuilder, $$MovementsTableUpdateCompanionBuilder, (Movement, BaseReferences<_$AppDatabase, $MovementsTable, Movement>), Movement, PrefetchHooks Function() > { $$MovementsTableTableManager(_$AppDatabase db, $MovementsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$MovementsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$MovementsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$MovementsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value lotId = const Value.absent(), Value type = const Value.absent(), Value occurredOn = const Value.absent(), Value counterpartyId = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value parentMovementId = const Value.absent(), Value plantareId = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => MovementsCompanion( id: id, createdAt: createdAt, lastAuthor: lastAuthor, schemaRowVersion: schemaRowVersion, lotId: lotId, type: type, occurredOn: occurredOn, counterpartyId: counterpartyId, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, parentMovementId: parentMovementId, plantareId: plantareId, notes: notes, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String lastAuthor, Value schemaRowVersion = const Value.absent(), required String lotId, required MovementType type, Value occurredOn = const Value.absent(), Value counterpartyId = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value parentMovementId = const Value.absent(), Value plantareId = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => MovementsCompanion.insert( id: id, createdAt: createdAt, lastAuthor: lastAuthor, schemaRowVersion: schemaRowVersion, lotId: lotId, type: type, occurredOn: occurredOn, counterpartyId: counterpartyId, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, parentMovementId: parentMovementId, plantareId: plantareId, notes: notes, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$MovementsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $MovementsTable, Movement, $$MovementsTableFilterComposer, $$MovementsTableOrderingComposer, $$MovementsTableAnnotationComposer, $$MovementsTableCreateCompanionBuilder, $$MovementsTableUpdateCompanionBuilder, (Movement, BaseReferences<_$AppDatabase, $MovementsTable, Movement>), Movement, PrefetchHooks Function() >; typedef $$PartiesTableCreateCompanionBuilder = PartiesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String displayName, Value publicKey, Value kind, Value note, Value rowid, }); typedef $$PartiesTableUpdateCompanionBuilder = PartiesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value displayName, Value publicKey, Value kind, Value note, Value rowid, }); class $$PartiesTableFilterComposer extends Composer<_$AppDatabase, $PartiesTable> { $$PartiesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnFilters(column), ); ColumnFilters get publicKey => $composableBuilder( column: $table.publicKey, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get note => $composableBuilder( column: $table.note, builder: (column) => ColumnFilters(column), ); } class $$PartiesTableOrderingComposer extends Composer<_$AppDatabase, $PartiesTable> { $$PartiesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get publicKey => $composableBuilder( column: $table.publicKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get note => $composableBuilder( column: $table.note, builder: (column) => ColumnOrderings(column), ); } class $$PartiesTableAnnotationComposer extends Composer<_$AppDatabase, $PartiesTable> { $$PartiesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get displayName => $composableBuilder( column: $table.displayName, builder: (column) => column, ); GeneratedColumn get publicKey => $composableBuilder(column: $table.publicKey, builder: (column) => column); GeneratedColumnWithTypeConverter get kind => $composableBuilder(column: $table.kind, builder: (column) => column); GeneratedColumn get note => $composableBuilder(column: $table.note, builder: (column) => column); } class $$PartiesTableTableManager extends RootTableManager< _$AppDatabase, $PartiesTable, Party, $$PartiesTableFilterComposer, $$PartiesTableOrderingComposer, $$PartiesTableAnnotationComposer, $$PartiesTableCreateCompanionBuilder, $$PartiesTableUpdateCompanionBuilder, (Party, BaseReferences<_$AppDatabase, $PartiesTable, Party>), Party, PrefetchHooks Function() > { $$PartiesTableTableManager(_$AppDatabase db, $PartiesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$PartiesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$PartiesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$PartiesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value displayName = const Value.absent(), Value publicKey = const Value.absent(), Value kind = const Value.absent(), Value note = const Value.absent(), Value rowid = const Value.absent(), }) => PartiesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, displayName: displayName, publicKey: publicKey, kind: kind, note: note, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String displayName, Value publicKey = const Value.absent(), Value kind = const Value.absent(), Value note = const Value.absent(), Value rowid = const Value.absent(), }) => PartiesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, displayName: displayName, publicKey: publicKey, kind: kind, note: note, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$PartiesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $PartiesTable, Party, $$PartiesTableFilterComposer, $$PartiesTableOrderingComposer, $$PartiesTableAnnotationComposer, $$PartiesTableCreateCompanionBuilder, $$PartiesTableUpdateCompanionBuilder, (Party, BaseReferences<_$AppDatabase, $PartiesTable, Party>), Party, PrefetchHooks Function() >; typedef $$AttachmentsTableCreateCompanionBuilder = AttachmentsCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required ParentType parentType, required String parentId, required AttachmentKind kind, Value uri, Value bytes, Value mimeType, Value rowid, }); typedef $$AttachmentsTableUpdateCompanionBuilder = AttachmentsCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value parentType, Value parentId, Value kind, Value uri, Value bytes, Value mimeType, Value rowid, }); class $$AttachmentsTableFilterComposer extends Composer<_$AppDatabase, $AttachmentsTable> { $$AttachmentsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get uri => $composableBuilder( column: $table.uri, builder: (column) => ColumnFilters(column), ); ColumnFilters get bytes => $composableBuilder( column: $table.bytes, builder: (column) => ColumnFilters(column), ); ColumnFilters get mimeType => $composableBuilder( column: $table.mimeType, builder: (column) => ColumnFilters(column), ); } class $$AttachmentsTableOrderingComposer extends Composer<_$AppDatabase, $AttachmentsTable> { $$AttachmentsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get uri => $composableBuilder( column: $table.uri, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get bytes => $composableBuilder( column: $table.bytes, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get mimeType => $composableBuilder( column: $table.mimeType, builder: (column) => ColumnOrderings(column), ); } class $$AttachmentsTableAnnotationComposer extends Composer<_$AppDatabase, $AttachmentsTable> { $$AttachmentsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumnWithTypeConverter get parentType => $composableBuilder( column: $table.parentType, builder: (column) => column, ); GeneratedColumn get parentId => $composableBuilder(column: $table.parentId, builder: (column) => column); GeneratedColumnWithTypeConverter get kind => $composableBuilder(column: $table.kind, builder: (column) => column); GeneratedColumn get uri => $composableBuilder(column: $table.uri, builder: (column) => column); GeneratedColumn get bytes => $composableBuilder(column: $table.bytes, builder: (column) => column); GeneratedColumn get mimeType => $composableBuilder(column: $table.mimeType, builder: (column) => column); } class $$AttachmentsTableTableManager extends RootTableManager< _$AppDatabase, $AttachmentsTable, Attachment, $$AttachmentsTableFilterComposer, $$AttachmentsTableOrderingComposer, $$AttachmentsTableAnnotationComposer, $$AttachmentsTableCreateCompanionBuilder, $$AttachmentsTableUpdateCompanionBuilder, ( Attachment, BaseReferences<_$AppDatabase, $AttachmentsTable, Attachment>, ), Attachment, PrefetchHooks Function() > { $$AttachmentsTableTableManager(_$AppDatabase db, $AttachmentsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$AttachmentsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$AttachmentsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$AttachmentsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value parentType = const Value.absent(), Value parentId = const Value.absent(), Value kind = const Value.absent(), Value uri = const Value.absent(), Value bytes = const Value.absent(), Value mimeType = const Value.absent(), Value rowid = const Value.absent(), }) => AttachmentsCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, kind: kind, uri: uri, bytes: bytes, mimeType: mimeType, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required AttachmentKind kind, Value uri = const Value.absent(), Value bytes = const Value.absent(), Value mimeType = const Value.absent(), Value rowid = const Value.absent(), }) => AttachmentsCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, kind: kind, uri: uri, bytes: bytes, mimeType: mimeType, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$AttachmentsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $AttachmentsTable, Attachment, $$AttachmentsTableFilterComposer, $$AttachmentsTableOrderingComposer, $$AttachmentsTableAnnotationComposer, $$AttachmentsTableCreateCompanionBuilder, $$AttachmentsTableUpdateCompanionBuilder, ( Attachment, BaseReferences<_$AppDatabase, $AttachmentsTable, Attachment>, ), Attachment, PrefetchHooks Function() >; typedef $$ExternalLinksTableCreateCompanionBuilder = ExternalLinksCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required ParentType parentType, required String parentId, required String url, Value title, Value rowid, }); typedef $$ExternalLinksTableUpdateCompanionBuilder = ExternalLinksCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value parentType, Value parentId, Value url, Value title, Value rowid, }); class $$ExternalLinksTableFilterComposer extends Composer<_$AppDatabase, $ExternalLinksTable> { $$ExternalLinksTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnFilters(column), ); ColumnFilters get url => $composableBuilder( column: $table.url, builder: (column) => ColumnFilters(column), ); ColumnFilters get title => $composableBuilder( column: $table.title, builder: (column) => ColumnFilters(column), ); } class $$ExternalLinksTableOrderingComposer extends Composer<_$AppDatabase, $ExternalLinksTable> { $$ExternalLinksTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get url => $composableBuilder( column: $table.url, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get title => $composableBuilder( column: $table.title, builder: (column) => ColumnOrderings(column), ); } class $$ExternalLinksTableAnnotationComposer extends Composer<_$AppDatabase, $ExternalLinksTable> { $$ExternalLinksTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumnWithTypeConverter get parentType => $composableBuilder( column: $table.parentType, builder: (column) => column, ); GeneratedColumn get parentId => $composableBuilder(column: $table.parentId, builder: (column) => column); GeneratedColumn get url => $composableBuilder(column: $table.url, builder: (column) => column); GeneratedColumn get title => $composableBuilder(column: $table.title, builder: (column) => column); } class $$ExternalLinksTableTableManager extends RootTableManager< _$AppDatabase, $ExternalLinksTable, ExternalLink, $$ExternalLinksTableFilterComposer, $$ExternalLinksTableOrderingComposer, $$ExternalLinksTableAnnotationComposer, $$ExternalLinksTableCreateCompanionBuilder, $$ExternalLinksTableUpdateCompanionBuilder, ( ExternalLink, BaseReferences<_$AppDatabase, $ExternalLinksTable, ExternalLink>, ), ExternalLink, PrefetchHooks Function() > { $$ExternalLinksTableTableManager(_$AppDatabase db, $ExternalLinksTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ExternalLinksTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ExternalLinksTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ExternalLinksTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value parentType = const Value.absent(), Value parentId = const Value.absent(), Value url = const Value.absent(), Value title = const Value.absent(), Value rowid = const Value.absent(), }) => ExternalLinksCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, url: url, title: title, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required String url, Value title = const Value.absent(), Value rowid = const Value.absent(), }) => ExternalLinksCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, url: url, title: title, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$ExternalLinksTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ExternalLinksTable, ExternalLink, $$ExternalLinksTableFilterComposer, $$ExternalLinksTableOrderingComposer, $$ExternalLinksTableAnnotationComposer, $$ExternalLinksTableCreateCompanionBuilder, $$ExternalLinksTableUpdateCompanionBuilder, ( ExternalLink, BaseReferences<_$AppDatabase, $ExternalLinksTable, ExternalLink>, ), ExternalLink, PrefetchHooks Function() >; class $AppDatabaseManager { final _$AppDatabase _db; $AppDatabaseManager(this._db); $$VarietiesTableTableManager get varieties => $$VarietiesTableTableManager(_db, _db.varieties); $$VarietyVernacularNamesTableTableManager get varietyVernacularNames => $$VarietyVernacularNamesTableTableManager( _db, _db.varietyVernacularNames, ); $$SpeciesTableTableManager get species => $$SpeciesTableTableManager(_db, _db.species); $$SpeciesCommonNamesTableTableManager get speciesCommonNames => $$SpeciesCommonNamesTableTableManager(_db, _db.speciesCommonNames); $$LotsTableTableManager get lots => $$LotsTableTableManager(_db, _db.lots); $$GerminationTestsTableTableManager get germinationTests => $$GerminationTestsTableTableManager(_db, _db.germinationTests); $$MovementsTableTableManager get movements => $$MovementsTableTableManager(_db, _db.movements); $$PartiesTableTableManager get parties => $$PartiesTableTableManager(_db, _db.parties); $$AttachmentsTableTableManager get attachments => $$AttachmentsTableTableManager(_db, _db.attachments); $$ExternalLinksTableTableManager get externalLinks => $$ExternalLinksTableTableManager(_db, _db.externalLinks); }