// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $SongsTable extends Songs with TableInfo<$SongsTable, Song> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SongsTable(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 _pathMeta = const VerificationMeta('path'); @override late final GeneratedColumn path = GeneratedColumn( 'path', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'), ); static const VerificationMeta _titleMeta = const VerificationMeta('title'); @override late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _artistMeta = const VerificationMeta('artist'); @override late final GeneratedColumn artist = GeneratedColumn( 'artist', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _albumMeta = const VerificationMeta('album'); @override late final GeneratedColumn album = GeneratedColumn( 'album', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _durationMsMeta = const VerificationMeta( 'durationMs', ); @override late final GeneratedColumn durationMs = GeneratedColumn( 'duration_ms', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _coverPathMeta = const VerificationMeta( 'coverPath', ); @override late final GeneratedColumn coverPath = GeneratedColumn( 'cover_path', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _dateAddedMsMeta = const VerificationMeta( 'dateAddedMs', ); @override late final GeneratedColumn dateAddedMs = GeneratedColumn( 'date_added_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMsMeta = const VerificationMeta( 'updatedAtMs', ); @override late final GeneratedColumn updatedAtMs = GeneratedColumn( 'updated_at_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _deletedMeta = const VerificationMeta( 'deleted', ); @override late final GeneratedColumn deleted = GeneratedColumn( 'deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _playCountMeta = const VerificationMeta( 'playCount', ); @override late final GeneratedColumn playCount = GeneratedColumn( 'play_count', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _categoriesEditedMeta = const VerificationMeta( 'categoriesEdited', ); @override late final GeneratedColumn categoriesEdited = GeneratedColumn( 'categories_edited', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("categories_edited" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _metadataEditedMeta = const VerificationMeta( 'metadataEdited', ); @override late final GeneratedColumn metadataEdited = GeneratedColumn( 'metadata_edited', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("metadata_edited" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _lyricsMeta = const VerificationMeta('lyrics'); @override late final GeneratedColumn lyrics = GeneratedColumn( 'lyrics', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _gainDbMeta = const VerificationMeta('gainDb'); @override late final GeneratedColumn gainDb = GeneratedColumn( 'gain_db', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false, ); static const VerificationMeta _cloudIdMeta = const VerificationMeta( 'cloudId', ); @override late final GeneratedColumn cloudId = GeneratedColumn( 'cloud_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, path, title, artist, album, durationMs, coverPath, dateAddedMs, updatedAtMs, deleted, playCount, categoriesEdited, metadataEdited, lyrics, gainDb, cloudId, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'songs'; @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('path')) { context.handle( _pathMeta, path.isAcceptableOrUnknown(data['path']!, _pathMeta), ); } else if (isInserting) { context.missing(_pathMeta); } if (data.containsKey('title')) { context.handle( _titleMeta, title.isAcceptableOrUnknown(data['title']!, _titleMeta), ); } else if (isInserting) { context.missing(_titleMeta); } if (data.containsKey('artist')) { context.handle( _artistMeta, artist.isAcceptableOrUnknown(data['artist']!, _artistMeta), ); } if (data.containsKey('album')) { context.handle( _albumMeta, album.isAcceptableOrUnknown(data['album']!, _albumMeta), ); } if (data.containsKey('duration_ms')) { context.handle( _durationMsMeta, durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta), ); } if (data.containsKey('cover_path')) { context.handle( _coverPathMeta, coverPath.isAcceptableOrUnknown(data['cover_path']!, _coverPathMeta), ); } if (data.containsKey('date_added_ms')) { context.handle( _dateAddedMsMeta, dateAddedMs.isAcceptableOrUnknown( data['date_added_ms']!, _dateAddedMsMeta, ), ); } else if (isInserting) { context.missing(_dateAddedMsMeta); } if (data.containsKey('updated_at_ms')) { context.handle( _updatedAtMsMeta, updatedAtMs.isAcceptableOrUnknown( data['updated_at_ms']!, _updatedAtMsMeta, ), ); } else if (isInserting) { context.missing(_updatedAtMsMeta); } if (data.containsKey('deleted')) { context.handle( _deletedMeta, deleted.isAcceptableOrUnknown(data['deleted']!, _deletedMeta), ); } if (data.containsKey('play_count')) { context.handle( _playCountMeta, playCount.isAcceptableOrUnknown(data['play_count']!, _playCountMeta), ); } if (data.containsKey('categories_edited')) { context.handle( _categoriesEditedMeta, categoriesEdited.isAcceptableOrUnknown( data['categories_edited']!, _categoriesEditedMeta, ), ); } if (data.containsKey('metadata_edited')) { context.handle( _metadataEditedMeta, metadataEdited.isAcceptableOrUnknown( data['metadata_edited']!, _metadataEditedMeta, ), ); } if (data.containsKey('lyrics')) { context.handle( _lyricsMeta, lyrics.isAcceptableOrUnknown(data['lyrics']!, _lyricsMeta), ); } if (data.containsKey('gain_db')) { context.handle( _gainDbMeta, gainDb.isAcceptableOrUnknown(data['gain_db']!, _gainDbMeta), ); } if (data.containsKey('cloud_id')) { context.handle( _cloudIdMeta, cloudId.isAcceptableOrUnknown(data['cloud_id']!, _cloudIdMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Song map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Song( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, path: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}path'], )!, title: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}title'], )!, artist: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}artist'], ), album: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}album'], ), durationMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}duration_ms'], ), coverPath: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}cover_path'], ), dateAddedMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}date_added_ms'], )!, updatedAtMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}updated_at_ms'], )!, deleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}deleted'], )!, playCount: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}play_count'], )!, categoriesEdited: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}categories_edited'], )!, metadataEdited: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}metadata_edited'], )!, lyrics: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}lyrics'], ), gainDb: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}gain_db'], ), cloudId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}cloud_id'], ), ); } @override $SongsTable createAlias(String alias) { return $SongsTable(attachedDatabase, alias); } } class Song extends DataClass implements Insertable { final String id; final String path; final String title; final String? artist; final String? album; final int? durationMs; final String? coverPath; final int dateAddedMs; final int updatedAtMs; final bool deleted; /// Wie oft der Song vollständig gestartet wurde — Grundlage für die /// Sortierung "Wie oft abgespielt". final int playCount; /// Sobald die Kategorien eines Songs von Hand geändert wurden, überschreibt /// ein erneuter Scan sie nicht mehr mit dem Genre-Tag der Datei. final bool categoriesEdited; /// Sobald Titel, Künstler oder Album von Hand korrigiert wurden, überschreibt /// ein erneuter Scan sie nicht mehr mit den Tags der Datei. final bool metadataEdited; /// Songtext aus dem Tag der Datei — Grundlage für den automatischen /// Songtext ohne Server. final String? lyrics; /// ReplayGain des Titels in Dezibel, sofern die Datei den Tag mitbringt — /// Grundlage für "Gleiche Lautstärke". final double? gainDb; /// ID desselben Titels in der Melo-Cloud. Verbindet den Titel auf dem Gerät /// mit dem am Server und ist die Grundlage des Abgleichs: ohne sie gilt ein /// Titel als nur lokal vorhanden und wird beim nächsten Sync hochgeladen. final String? cloudId; const Song({ required this.id, required this.path, required this.title, this.artist, this.album, this.durationMs, this.coverPath, required this.dateAddedMs, required this.updatedAtMs, required this.deleted, required this.playCount, required this.categoriesEdited, required this.metadataEdited, this.lyrics, this.gainDb, this.cloudId, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['path'] = Variable(path); map['title'] = Variable(title); if (!nullToAbsent || artist != null) { map['artist'] = Variable(artist); } if (!nullToAbsent || album != null) { map['album'] = Variable(album); } if (!nullToAbsent || durationMs != null) { map['duration_ms'] = Variable(durationMs); } if (!nullToAbsent || coverPath != null) { map['cover_path'] = Variable(coverPath); } map['date_added_ms'] = Variable(dateAddedMs); map['updated_at_ms'] = Variable(updatedAtMs); map['deleted'] = Variable(deleted); map['play_count'] = Variable(playCount); map['categories_edited'] = Variable(categoriesEdited); map['metadata_edited'] = Variable(metadataEdited); if (!nullToAbsent || lyrics != null) { map['lyrics'] = Variable(lyrics); } if (!nullToAbsent || gainDb != null) { map['gain_db'] = Variable(gainDb); } if (!nullToAbsent || cloudId != null) { map['cloud_id'] = Variable(cloudId); } return map; } SongsCompanion toCompanion(bool nullToAbsent) { return SongsCompanion( id: Value(id), path: Value(path), title: Value(title), artist: artist == null && nullToAbsent ? const Value.absent() : Value(artist), album: album == null && nullToAbsent ? const Value.absent() : Value(album), durationMs: durationMs == null && nullToAbsent ? const Value.absent() : Value(durationMs), coverPath: coverPath == null && nullToAbsent ? const Value.absent() : Value(coverPath), dateAddedMs: Value(dateAddedMs), updatedAtMs: Value(updatedAtMs), deleted: Value(deleted), playCount: Value(playCount), categoriesEdited: Value(categoriesEdited), metadataEdited: Value(metadataEdited), lyrics: lyrics == null && nullToAbsent ? const Value.absent() : Value(lyrics), gainDb: gainDb == null && nullToAbsent ? const Value.absent() : Value(gainDb), cloudId: cloudId == null && nullToAbsent ? const Value.absent() : Value(cloudId), ); } factory Song.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Song( id: serializer.fromJson(json['id']), path: serializer.fromJson(json['path']), title: serializer.fromJson(json['title']), artist: serializer.fromJson(json['artist']), album: serializer.fromJson(json['album']), durationMs: serializer.fromJson(json['durationMs']), coverPath: serializer.fromJson(json['coverPath']), dateAddedMs: serializer.fromJson(json['dateAddedMs']), updatedAtMs: serializer.fromJson(json['updatedAtMs']), deleted: serializer.fromJson(json['deleted']), playCount: serializer.fromJson(json['playCount']), categoriesEdited: serializer.fromJson(json['categoriesEdited']), metadataEdited: serializer.fromJson(json['metadataEdited']), lyrics: serializer.fromJson(json['lyrics']), gainDb: serializer.fromJson(json['gainDb']), cloudId: serializer.fromJson(json['cloudId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'path': serializer.toJson(path), 'title': serializer.toJson(title), 'artist': serializer.toJson(artist), 'album': serializer.toJson(album), 'durationMs': serializer.toJson(durationMs), 'coverPath': serializer.toJson(coverPath), 'dateAddedMs': serializer.toJson(dateAddedMs), 'updatedAtMs': serializer.toJson(updatedAtMs), 'deleted': serializer.toJson(deleted), 'playCount': serializer.toJson(playCount), 'categoriesEdited': serializer.toJson(categoriesEdited), 'metadataEdited': serializer.toJson(metadataEdited), 'lyrics': serializer.toJson(lyrics), 'gainDb': serializer.toJson(gainDb), 'cloudId': serializer.toJson(cloudId), }; } Song copyWith({ String? id, String? path, String? title, Value artist = const Value.absent(), Value album = const Value.absent(), Value durationMs = const Value.absent(), Value coverPath = const Value.absent(), int? dateAddedMs, int? updatedAtMs, bool? deleted, int? playCount, bool? categoriesEdited, bool? metadataEdited, Value lyrics = const Value.absent(), Value gainDb = const Value.absent(), Value cloudId = const Value.absent(), }) => Song( id: id ?? this.id, path: path ?? this.path, title: title ?? this.title, artist: artist.present ? artist.value : this.artist, album: album.present ? album.value : this.album, durationMs: durationMs.present ? durationMs.value : this.durationMs, coverPath: coverPath.present ? coverPath.value : this.coverPath, dateAddedMs: dateAddedMs ?? this.dateAddedMs, updatedAtMs: updatedAtMs ?? this.updatedAtMs, deleted: deleted ?? this.deleted, playCount: playCount ?? this.playCount, categoriesEdited: categoriesEdited ?? this.categoriesEdited, metadataEdited: metadataEdited ?? this.metadataEdited, lyrics: lyrics.present ? lyrics.value : this.lyrics, gainDb: gainDb.present ? gainDb.value : this.gainDb, cloudId: cloudId.present ? cloudId.value : this.cloudId, ); Song copyWithCompanion(SongsCompanion data) { return Song( id: data.id.present ? data.id.value : this.id, path: data.path.present ? data.path.value : this.path, title: data.title.present ? data.title.value : this.title, artist: data.artist.present ? data.artist.value : this.artist, album: data.album.present ? data.album.value : this.album, durationMs: data.durationMs.present ? data.durationMs.value : this.durationMs, coverPath: data.coverPath.present ? data.coverPath.value : this.coverPath, dateAddedMs: data.dateAddedMs.present ? data.dateAddedMs.value : this.dateAddedMs, updatedAtMs: data.updatedAtMs.present ? data.updatedAtMs.value : this.updatedAtMs, deleted: data.deleted.present ? data.deleted.value : this.deleted, playCount: data.playCount.present ? data.playCount.value : this.playCount, categoriesEdited: data.categoriesEdited.present ? data.categoriesEdited.value : this.categoriesEdited, metadataEdited: data.metadataEdited.present ? data.metadataEdited.value : this.metadataEdited, lyrics: data.lyrics.present ? data.lyrics.value : this.lyrics, gainDb: data.gainDb.present ? data.gainDb.value : this.gainDb, cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, ); } @override String toString() { return (StringBuffer('Song(') ..write('id: $id, ') ..write('path: $path, ') ..write('title: $title, ') ..write('artist: $artist, ') ..write('album: $album, ') ..write('durationMs: $durationMs, ') ..write('coverPath: $coverPath, ') ..write('dateAddedMs: $dateAddedMs, ') ..write('updatedAtMs: $updatedAtMs, ') ..write('deleted: $deleted, ') ..write('playCount: $playCount, ') ..write('categoriesEdited: $categoriesEdited, ') ..write('metadataEdited: $metadataEdited, ') ..write('lyrics: $lyrics, ') ..write('gainDb: $gainDb, ') ..write('cloudId: $cloudId') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, path, title, artist, album, durationMs, coverPath, dateAddedMs, updatedAtMs, deleted, playCount, categoriesEdited, metadataEdited, lyrics, gainDb, cloudId, ); @override bool operator ==(Object other) => identical(this, other) || (other is Song && other.id == this.id && other.path == this.path && other.title == this.title && other.artist == this.artist && other.album == this.album && other.durationMs == this.durationMs && other.coverPath == this.coverPath && other.dateAddedMs == this.dateAddedMs && other.updatedAtMs == this.updatedAtMs && other.deleted == this.deleted && other.playCount == this.playCount && other.categoriesEdited == this.categoriesEdited && other.metadataEdited == this.metadataEdited && other.lyrics == this.lyrics && other.gainDb == this.gainDb && other.cloudId == this.cloudId); } class SongsCompanion extends UpdateCompanion { final Value id; final Value path; final Value title; final Value artist; final Value album; final Value durationMs; final Value coverPath; final Value dateAddedMs; final Value updatedAtMs; final Value deleted; final Value playCount; final Value categoriesEdited; final Value metadataEdited; final Value lyrics; final Value gainDb; final Value cloudId; final Value rowid; const SongsCompanion({ this.id = const Value.absent(), this.path = const Value.absent(), this.title = const Value.absent(), this.artist = const Value.absent(), this.album = const Value.absent(), this.durationMs = const Value.absent(), this.coverPath = const Value.absent(), this.dateAddedMs = const Value.absent(), this.updatedAtMs = const Value.absent(), this.deleted = const Value.absent(), this.playCount = const Value.absent(), this.categoriesEdited = const Value.absent(), this.metadataEdited = const Value.absent(), this.lyrics = const Value.absent(), this.gainDb = const Value.absent(), this.cloudId = const Value.absent(), this.rowid = const Value.absent(), }); SongsCompanion.insert({ required String id, required String path, required String title, this.artist = const Value.absent(), this.album = const Value.absent(), this.durationMs = const Value.absent(), this.coverPath = const Value.absent(), required int dateAddedMs, required int updatedAtMs, this.deleted = const Value.absent(), this.playCount = const Value.absent(), this.categoriesEdited = const Value.absent(), this.metadataEdited = const Value.absent(), this.lyrics = const Value.absent(), this.gainDb = const Value.absent(), this.cloudId = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), path = Value(path), title = Value(title), dateAddedMs = Value(dateAddedMs), updatedAtMs = Value(updatedAtMs); static Insertable custom({ Expression? id, Expression? path, Expression? title, Expression? artist, Expression? album, Expression? durationMs, Expression? coverPath, Expression? dateAddedMs, Expression? updatedAtMs, Expression? deleted, Expression? playCount, Expression? categoriesEdited, Expression? metadataEdited, Expression? lyrics, Expression? gainDb, Expression? cloudId, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (path != null) 'path': path, if (title != null) 'title': title, if (artist != null) 'artist': artist, if (album != null) 'album': album, if (durationMs != null) 'duration_ms': durationMs, if (coverPath != null) 'cover_path': coverPath, if (dateAddedMs != null) 'date_added_ms': dateAddedMs, if (updatedAtMs != null) 'updated_at_ms': updatedAtMs, if (deleted != null) 'deleted': deleted, if (playCount != null) 'play_count': playCount, if (categoriesEdited != null) 'categories_edited': categoriesEdited, if (metadataEdited != null) 'metadata_edited': metadataEdited, if (lyrics != null) 'lyrics': lyrics, if (gainDb != null) 'gain_db': gainDb, if (cloudId != null) 'cloud_id': cloudId, if (rowid != null) 'rowid': rowid, }); } SongsCompanion copyWith({ Value? id, Value? path, Value? title, Value? artist, Value? album, Value? durationMs, Value? coverPath, Value? dateAddedMs, Value? updatedAtMs, Value? deleted, Value? playCount, Value? categoriesEdited, Value? metadataEdited, Value? lyrics, Value? gainDb, Value? cloudId, Value? rowid, }) { return SongsCompanion( id: id ?? this.id, path: path ?? this.path, title: title ?? this.title, artist: artist ?? this.artist, album: album ?? this.album, durationMs: durationMs ?? this.durationMs, coverPath: coverPath ?? this.coverPath, dateAddedMs: dateAddedMs ?? this.dateAddedMs, updatedAtMs: updatedAtMs ?? this.updatedAtMs, deleted: deleted ?? this.deleted, playCount: playCount ?? this.playCount, categoriesEdited: categoriesEdited ?? this.categoriesEdited, metadataEdited: metadataEdited ?? this.metadataEdited, lyrics: lyrics ?? this.lyrics, gainDb: gainDb ?? this.gainDb, cloudId: cloudId ?? this.cloudId, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (path.present) { map['path'] = Variable(path.value); } if (title.present) { map['title'] = Variable(title.value); } if (artist.present) { map['artist'] = Variable(artist.value); } if (album.present) { map['album'] = Variable(album.value); } if (durationMs.present) { map['duration_ms'] = Variable(durationMs.value); } if (coverPath.present) { map['cover_path'] = Variable(coverPath.value); } if (dateAddedMs.present) { map['date_added_ms'] = Variable(dateAddedMs.value); } if (updatedAtMs.present) { map['updated_at_ms'] = Variable(updatedAtMs.value); } if (deleted.present) { map['deleted'] = Variable(deleted.value); } if (playCount.present) { map['play_count'] = Variable(playCount.value); } if (categoriesEdited.present) { map['categories_edited'] = Variable(categoriesEdited.value); } if (metadataEdited.present) { map['metadata_edited'] = Variable(metadataEdited.value); } if (lyrics.present) { map['lyrics'] = Variable(lyrics.value); } if (gainDb.present) { map['gain_db'] = Variable(gainDb.value); } if (cloudId.present) { map['cloud_id'] = Variable(cloudId.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SongsCompanion(') ..write('id: $id, ') ..write('path: $path, ') ..write('title: $title, ') ..write('artist: $artist, ') ..write('album: $album, ') ..write('durationMs: $durationMs, ') ..write('coverPath: $coverPath, ') ..write('dateAddedMs: $dateAddedMs, ') ..write('updatedAtMs: $updatedAtMs, ') ..write('deleted: $deleted, ') ..write('playCount: $playCount, ') ..write('categoriesEdited: $categoriesEdited, ') ..write('metadataEdited: $metadataEdited, ') ..write('lyrics: $lyrics, ') ..write('gainDb: $gainDb, ') ..write('cloudId: $cloudId, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $FoldersTable extends Folders with TableInfo<$FoldersTable, Folder> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $FoldersTable(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 _pathMeta = const VerificationMeta('path'); @override late final GeneratedColumn path = GeneratedColumn( 'path', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'), ); static const VerificationMeta _updatedAtMsMeta = const VerificationMeta( 'updatedAtMs', ); @override late final GeneratedColumn updatedAtMs = GeneratedColumn( 'updated_at_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _deletedMeta = const VerificationMeta( 'deleted', ); @override late final GeneratedColumn deleted = GeneratedColumn( 'deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); @override List get $columns => [id, path, updatedAtMs, deleted]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'folders'; @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('path')) { context.handle( _pathMeta, path.isAcceptableOrUnknown(data['path']!, _pathMeta), ); } else if (isInserting) { context.missing(_pathMeta); } if (data.containsKey('updated_at_ms')) { context.handle( _updatedAtMsMeta, updatedAtMs.isAcceptableOrUnknown( data['updated_at_ms']!, _updatedAtMsMeta, ), ); } else if (isInserting) { context.missing(_updatedAtMsMeta); } if (data.containsKey('deleted')) { context.handle( _deletedMeta, deleted.isAcceptableOrUnknown(data['deleted']!, _deletedMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Folder map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Folder( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, path: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}path'], )!, updatedAtMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}updated_at_ms'], )!, deleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}deleted'], )!, ); } @override $FoldersTable createAlias(String alias) { return $FoldersTable(attachedDatabase, alias); } } class Folder extends DataClass implements Insertable { final String id; final String path; final int updatedAtMs; final bool deleted; const Folder({ required this.id, required this.path, required this.updatedAtMs, required this.deleted, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['path'] = Variable(path); map['updated_at_ms'] = Variable(updatedAtMs); map['deleted'] = Variable(deleted); return map; } FoldersCompanion toCompanion(bool nullToAbsent) { return FoldersCompanion( id: Value(id), path: Value(path), updatedAtMs: Value(updatedAtMs), deleted: Value(deleted), ); } factory Folder.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Folder( id: serializer.fromJson(json['id']), path: serializer.fromJson(json['path']), updatedAtMs: serializer.fromJson(json['updatedAtMs']), deleted: serializer.fromJson(json['deleted']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'path': serializer.toJson(path), 'updatedAtMs': serializer.toJson(updatedAtMs), 'deleted': serializer.toJson(deleted), }; } Folder copyWith({ String? id, String? path, int? updatedAtMs, bool? deleted, }) => Folder( id: id ?? this.id, path: path ?? this.path, updatedAtMs: updatedAtMs ?? this.updatedAtMs, deleted: deleted ?? this.deleted, ); Folder copyWithCompanion(FoldersCompanion data) { return Folder( id: data.id.present ? data.id.value : this.id, path: data.path.present ? data.path.value : this.path, updatedAtMs: data.updatedAtMs.present ? data.updatedAtMs.value : this.updatedAtMs, deleted: data.deleted.present ? data.deleted.value : this.deleted, ); } @override String toString() { return (StringBuffer('Folder(') ..write('id: $id, ') ..write('path: $path, ') ..write('updatedAtMs: $updatedAtMs, ') ..write('deleted: $deleted') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, path, updatedAtMs, deleted); @override bool operator ==(Object other) => identical(this, other) || (other is Folder && other.id == this.id && other.path == this.path && other.updatedAtMs == this.updatedAtMs && other.deleted == this.deleted); } class FoldersCompanion extends UpdateCompanion { final Value id; final Value path; final Value updatedAtMs; final Value deleted; final Value rowid; const FoldersCompanion({ this.id = const Value.absent(), this.path = const Value.absent(), this.updatedAtMs = const Value.absent(), this.deleted = const Value.absent(), this.rowid = const Value.absent(), }); FoldersCompanion.insert({ required String id, required String path, required int updatedAtMs, this.deleted = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), path = Value(path), updatedAtMs = Value(updatedAtMs); static Insertable custom({ Expression? id, Expression? path, Expression? updatedAtMs, Expression? deleted, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (path != null) 'path': path, if (updatedAtMs != null) 'updated_at_ms': updatedAtMs, if (deleted != null) 'deleted': deleted, if (rowid != null) 'rowid': rowid, }); } FoldersCompanion copyWith({ Value? id, Value? path, Value? updatedAtMs, Value? deleted, Value? rowid, }) { return FoldersCompanion( id: id ?? this.id, path: path ?? this.path, updatedAtMs: updatedAtMs ?? this.updatedAtMs, deleted: deleted ?? this.deleted, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (path.present) { map['path'] = Variable(path.value); } if (updatedAtMs.present) { map['updated_at_ms'] = Variable(updatedAtMs.value); } if (deleted.present) { map['deleted'] = Variable(deleted.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('FoldersCompanion(') ..write('id: $id, ') ..write('path: $path, ') ..write('updatedAtMs: $updatedAtMs, ') ..write('deleted: $deleted, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $PlaylistsTable extends Playlists with TableInfo<$PlaylistsTable, Playlist> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PlaylistsTable(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 _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _descriptionMeta = const VerificationMeta( 'description', ); @override late final GeneratedColumn description = GeneratedColumn( 'description', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _createdAtMsMeta = const VerificationMeta( 'createdAtMs', ); @override late final GeneratedColumn createdAtMs = GeneratedColumn( 'created_at_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMsMeta = const VerificationMeta( 'updatedAtMs', ); @override late final GeneratedColumn updatedAtMs = GeneratedColumn( 'updated_at_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _deletedMeta = const VerificationMeta( 'deleted', ); @override late final GeneratedColumn deleted = GeneratedColumn( 'deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _cloudIdMeta = const VerificationMeta( 'cloudId', ); @override late final GeneratedColumn cloudId = GeneratedColumn( 'cloud_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, name, description, createdAtMs, updatedAtMs, deleted, cloudId, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'playlists'; @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('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('description')) { context.handle( _descriptionMeta, description.isAcceptableOrUnknown( data['description']!, _descriptionMeta, ), ); } if (data.containsKey('created_at_ms')) { context.handle( _createdAtMsMeta, createdAtMs.isAcceptableOrUnknown( data['created_at_ms']!, _createdAtMsMeta, ), ); } else if (isInserting) { context.missing(_createdAtMsMeta); } if (data.containsKey('updated_at_ms')) { context.handle( _updatedAtMsMeta, updatedAtMs.isAcceptableOrUnknown( data['updated_at_ms']!, _updatedAtMsMeta, ), ); } else if (isInserting) { context.missing(_updatedAtMsMeta); } if (data.containsKey('deleted')) { context.handle( _deletedMeta, deleted.isAcceptableOrUnknown(data['deleted']!, _deletedMeta), ); } if (data.containsKey('cloud_id')) { context.handle( _cloudIdMeta, cloudId.isAcceptableOrUnknown(data['cloud_id']!, _cloudIdMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Playlist map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Playlist( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, description: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}description'], ), createdAtMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at_ms'], )!, updatedAtMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}updated_at_ms'], )!, deleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}deleted'], )!, cloudId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}cloud_id'], ), ); } @override $PlaylistsTable createAlias(String alias) { return $PlaylistsTable(attachedDatabase, alias); } } class Playlist extends DataClass implements Insertable { final String id; final String name; final String? description; final int createdAtMs; final int updatedAtMs; final bool deleted; /// ID derselben Playlist am Melo-Server, sobald sie einmal gesichert /// wurde. `null` heißt: nur auf diesem Gerät. final String? cloudId; const Playlist({ required this.id, required this.name, this.description, required this.createdAtMs, required this.updatedAtMs, required this.deleted, this.cloudId, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['name'] = Variable(name); if (!nullToAbsent || description != null) { map['description'] = Variable(description); } map['created_at_ms'] = Variable(createdAtMs); map['updated_at_ms'] = Variable(updatedAtMs); map['deleted'] = Variable(deleted); if (!nullToAbsent || cloudId != null) { map['cloud_id'] = Variable(cloudId); } return map; } PlaylistsCompanion toCompanion(bool nullToAbsent) { return PlaylistsCompanion( id: Value(id), name: Value(name), description: description == null && nullToAbsent ? const Value.absent() : Value(description), createdAtMs: Value(createdAtMs), updatedAtMs: Value(updatedAtMs), deleted: Value(deleted), cloudId: cloudId == null && nullToAbsent ? const Value.absent() : Value(cloudId), ); } factory Playlist.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Playlist( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), description: serializer.fromJson(json['description']), createdAtMs: serializer.fromJson(json['createdAtMs']), updatedAtMs: serializer.fromJson(json['updatedAtMs']), deleted: serializer.fromJson(json['deleted']), cloudId: serializer.fromJson(json['cloudId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'description': serializer.toJson(description), 'createdAtMs': serializer.toJson(createdAtMs), 'updatedAtMs': serializer.toJson(updatedAtMs), 'deleted': serializer.toJson(deleted), 'cloudId': serializer.toJson(cloudId), }; } Playlist copyWith({ String? id, String? name, Value description = const Value.absent(), int? createdAtMs, int? updatedAtMs, bool? deleted, Value cloudId = const Value.absent(), }) => Playlist( id: id ?? this.id, name: name ?? this.name, description: description.present ? description.value : this.description, createdAtMs: createdAtMs ?? this.createdAtMs, updatedAtMs: updatedAtMs ?? this.updatedAtMs, deleted: deleted ?? this.deleted, cloudId: cloudId.present ? cloudId.value : this.cloudId, ); Playlist copyWithCompanion(PlaylistsCompanion data) { return Playlist( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, description: data.description.present ? data.description.value : this.description, createdAtMs: data.createdAtMs.present ? data.createdAtMs.value : this.createdAtMs, updatedAtMs: data.updatedAtMs.present ? data.updatedAtMs.value : this.updatedAtMs, deleted: data.deleted.present ? data.deleted.value : this.deleted, cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId, ); } @override String toString() { return (StringBuffer('Playlist(') ..write('id: $id, ') ..write('name: $name, ') ..write('description: $description, ') ..write('createdAtMs: $createdAtMs, ') ..write('updatedAtMs: $updatedAtMs, ') ..write('deleted: $deleted, ') ..write('cloudId: $cloudId') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, name, description, createdAtMs, updatedAtMs, deleted, cloudId, ); @override bool operator ==(Object other) => identical(this, other) || (other is Playlist && other.id == this.id && other.name == this.name && other.description == this.description && other.createdAtMs == this.createdAtMs && other.updatedAtMs == this.updatedAtMs && other.deleted == this.deleted && other.cloudId == this.cloudId); } class PlaylistsCompanion extends UpdateCompanion { final Value id; final Value name; final Value description; final Value createdAtMs; final Value updatedAtMs; final Value deleted; final Value cloudId; final Value rowid; const PlaylistsCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.description = const Value.absent(), this.createdAtMs = const Value.absent(), this.updatedAtMs = const Value.absent(), this.deleted = const Value.absent(), this.cloudId = const Value.absent(), this.rowid = const Value.absent(), }); PlaylistsCompanion.insert({ required String id, required String name, this.description = const Value.absent(), required int createdAtMs, required int updatedAtMs, this.deleted = const Value.absent(), this.cloudId = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), name = Value(name), createdAtMs = Value(createdAtMs), updatedAtMs = Value(updatedAtMs); static Insertable custom({ Expression? id, Expression? name, Expression? description, Expression? createdAtMs, Expression? updatedAtMs, Expression? deleted, Expression? cloudId, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (description != null) 'description': description, if (createdAtMs != null) 'created_at_ms': createdAtMs, if (updatedAtMs != null) 'updated_at_ms': updatedAtMs, if (deleted != null) 'deleted': deleted, if (cloudId != null) 'cloud_id': cloudId, if (rowid != null) 'rowid': rowid, }); } PlaylistsCompanion copyWith({ Value? id, Value? name, Value? description, Value? createdAtMs, Value? updatedAtMs, Value? deleted, Value? cloudId, Value? rowid, }) { return PlaylistsCompanion( id: id ?? this.id, name: name ?? this.name, description: description ?? this.description, createdAtMs: createdAtMs ?? this.createdAtMs, updatedAtMs: updatedAtMs ?? this.updatedAtMs, deleted: deleted ?? this.deleted, cloudId: cloudId ?? this.cloudId, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (description.present) { map['description'] = Variable(description.value); } if (createdAtMs.present) { map['created_at_ms'] = Variable(createdAtMs.value); } if (updatedAtMs.present) { map['updated_at_ms'] = Variable(updatedAtMs.value); } if (deleted.present) { map['deleted'] = Variable(deleted.value); } if (cloudId.present) { map['cloud_id'] = Variable(cloudId.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PlaylistsCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('description: $description, ') ..write('createdAtMs: $createdAtMs, ') ..write('updatedAtMs: $updatedAtMs, ') ..write('deleted: $deleted, ') ..write('cloudId: $cloudId, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $PlaylistSongsTable extends PlaylistSongs with TableInfo<$PlaylistSongsTable, PlaylistSong> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PlaylistSongsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _playlistIdMeta = const VerificationMeta( 'playlistId', ); @override late final GeneratedColumn playlistId = GeneratedColumn( 'playlist_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES playlists (id)', ), ); static const VerificationMeta _songIdMeta = const VerificationMeta('songId'); @override late final GeneratedColumn songId = GeneratedColumn( 'song_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES songs (id)', ), ); static const VerificationMeta _positionMeta = const VerificationMeta( 'position', ); @override late final GeneratedColumn position = GeneratedColumn( 'position', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _addedAtMsMeta = const VerificationMeta( 'addedAtMs', ); @override late final GeneratedColumn addedAtMs = GeneratedColumn( 'added_at_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); @override List get $columns => [ playlistId, songId, position, addedAtMs, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'playlist_songs'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('playlist_id')) { context.handle( _playlistIdMeta, playlistId.isAcceptableOrUnknown(data['playlist_id']!, _playlistIdMeta), ); } else if (isInserting) { context.missing(_playlistIdMeta); } if (data.containsKey('song_id')) { context.handle( _songIdMeta, songId.isAcceptableOrUnknown(data['song_id']!, _songIdMeta), ); } else if (isInserting) { context.missing(_songIdMeta); } if (data.containsKey('position')) { context.handle( _positionMeta, position.isAcceptableOrUnknown(data['position']!, _positionMeta), ); } else if (isInserting) { context.missing(_positionMeta); } if (data.containsKey('added_at_ms')) { context.handle( _addedAtMsMeta, addedAtMs.isAcceptableOrUnknown(data['added_at_ms']!, _addedAtMsMeta), ); } else if (isInserting) { context.missing(_addedAtMsMeta); } return context; } @override Set get $primaryKey => {playlistId, songId}; @override PlaylistSong map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return PlaylistSong( playlistId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}playlist_id'], )!, songId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}song_id'], )!, position: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}position'], )!, addedAtMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}added_at_ms'], )!, ); } @override $PlaylistSongsTable createAlias(String alias) { return $PlaylistSongsTable(attachedDatabase, alias); } } class PlaylistSong extends DataClass implements Insertable { final String playlistId; final String songId; final int position; final int addedAtMs; const PlaylistSong({ required this.playlistId, required this.songId, required this.position, required this.addedAtMs, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['playlist_id'] = Variable(playlistId); map['song_id'] = Variable(songId); map['position'] = Variable(position); map['added_at_ms'] = Variable(addedAtMs); return map; } PlaylistSongsCompanion toCompanion(bool nullToAbsent) { return PlaylistSongsCompanion( playlistId: Value(playlistId), songId: Value(songId), position: Value(position), addedAtMs: Value(addedAtMs), ); } factory PlaylistSong.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return PlaylistSong( playlistId: serializer.fromJson(json['playlistId']), songId: serializer.fromJson(json['songId']), position: serializer.fromJson(json['position']), addedAtMs: serializer.fromJson(json['addedAtMs']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'playlistId': serializer.toJson(playlistId), 'songId': serializer.toJson(songId), 'position': serializer.toJson(position), 'addedAtMs': serializer.toJson(addedAtMs), }; } PlaylistSong copyWith({ String? playlistId, String? songId, int? position, int? addedAtMs, }) => PlaylistSong( playlistId: playlistId ?? this.playlistId, songId: songId ?? this.songId, position: position ?? this.position, addedAtMs: addedAtMs ?? this.addedAtMs, ); PlaylistSong copyWithCompanion(PlaylistSongsCompanion data) { return PlaylistSong( playlistId: data.playlistId.present ? data.playlistId.value : this.playlistId, songId: data.songId.present ? data.songId.value : this.songId, position: data.position.present ? data.position.value : this.position, addedAtMs: data.addedAtMs.present ? data.addedAtMs.value : this.addedAtMs, ); } @override String toString() { return (StringBuffer('PlaylistSong(') ..write('playlistId: $playlistId, ') ..write('songId: $songId, ') ..write('position: $position, ') ..write('addedAtMs: $addedAtMs') ..write(')')) .toString(); } @override int get hashCode => Object.hash(playlistId, songId, position, addedAtMs); @override bool operator ==(Object other) => identical(this, other) || (other is PlaylistSong && other.playlistId == this.playlistId && other.songId == this.songId && other.position == this.position && other.addedAtMs == this.addedAtMs); } class PlaylistSongsCompanion extends UpdateCompanion { final Value playlistId; final Value songId; final Value position; final Value addedAtMs; final Value rowid; const PlaylistSongsCompanion({ this.playlistId = const Value.absent(), this.songId = const Value.absent(), this.position = const Value.absent(), this.addedAtMs = const Value.absent(), this.rowid = const Value.absent(), }); PlaylistSongsCompanion.insert({ required String playlistId, required String songId, required int position, required int addedAtMs, this.rowid = const Value.absent(), }) : playlistId = Value(playlistId), songId = Value(songId), position = Value(position), addedAtMs = Value(addedAtMs); static Insertable custom({ Expression? playlistId, Expression? songId, Expression? position, Expression? addedAtMs, Expression? rowid, }) { return RawValuesInsertable({ if (playlistId != null) 'playlist_id': playlistId, if (songId != null) 'song_id': songId, if (position != null) 'position': position, if (addedAtMs != null) 'added_at_ms': addedAtMs, if (rowid != null) 'rowid': rowid, }); } PlaylistSongsCompanion copyWith({ Value? playlistId, Value? songId, Value? position, Value? addedAtMs, Value? rowid, }) { return PlaylistSongsCompanion( playlistId: playlistId ?? this.playlistId, songId: songId ?? this.songId, position: position ?? this.position, addedAtMs: addedAtMs ?? this.addedAtMs, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (playlistId.present) { map['playlist_id'] = Variable(playlistId.value); } if (songId.present) { map['song_id'] = Variable(songId.value); } if (position.present) { map['position'] = Variable(position.value); } if (addedAtMs.present) { map['added_at_ms'] = Variable(addedAtMs.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PlaylistSongsCompanion(') ..write('playlistId: $playlistId, ') ..write('songId: $songId, ') ..write('position: $position, ') ..write('addedAtMs: $addedAtMs, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $FavoritesTable extends Favorites with TableInfo<$FavoritesTable, Favorite> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $FavoritesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _songIdMeta = const VerificationMeta('songId'); @override late final GeneratedColumn songId = GeneratedColumn( 'song_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES songs (id)', ), ); static const VerificationMeta _createdAtMsMeta = const VerificationMeta( 'createdAtMs', ); @override late final GeneratedColumn createdAtMs = GeneratedColumn( 'created_at_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); @override List get $columns => [songId, createdAtMs]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'favorites'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('song_id')) { context.handle( _songIdMeta, songId.isAcceptableOrUnknown(data['song_id']!, _songIdMeta), ); } else if (isInserting) { context.missing(_songIdMeta); } if (data.containsKey('created_at_ms')) { context.handle( _createdAtMsMeta, createdAtMs.isAcceptableOrUnknown( data['created_at_ms']!, _createdAtMsMeta, ), ); } else if (isInserting) { context.missing(_createdAtMsMeta); } return context; } @override Set get $primaryKey => {songId}; @override Favorite map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Favorite( songId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}song_id'], )!, createdAtMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at_ms'], )!, ); } @override $FavoritesTable createAlias(String alias) { return $FavoritesTable(attachedDatabase, alias); } } class Favorite extends DataClass implements Insertable { final String songId; final int createdAtMs; const Favorite({required this.songId, required this.createdAtMs}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['song_id'] = Variable(songId); map['created_at_ms'] = Variable(createdAtMs); return map; } FavoritesCompanion toCompanion(bool nullToAbsent) { return FavoritesCompanion( songId: Value(songId), createdAtMs: Value(createdAtMs), ); } factory Favorite.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Favorite( songId: serializer.fromJson(json['songId']), createdAtMs: serializer.fromJson(json['createdAtMs']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'songId': serializer.toJson(songId), 'createdAtMs': serializer.toJson(createdAtMs), }; } Favorite copyWith({String? songId, int? createdAtMs}) => Favorite( songId: songId ?? this.songId, createdAtMs: createdAtMs ?? this.createdAtMs, ); Favorite copyWithCompanion(FavoritesCompanion data) { return Favorite( songId: data.songId.present ? data.songId.value : this.songId, createdAtMs: data.createdAtMs.present ? data.createdAtMs.value : this.createdAtMs, ); } @override String toString() { return (StringBuffer('Favorite(') ..write('songId: $songId, ') ..write('createdAtMs: $createdAtMs') ..write(')')) .toString(); } @override int get hashCode => Object.hash(songId, createdAtMs); @override bool operator ==(Object other) => identical(this, other) || (other is Favorite && other.songId == this.songId && other.createdAtMs == this.createdAtMs); } class FavoritesCompanion extends UpdateCompanion { final Value songId; final Value createdAtMs; final Value rowid; const FavoritesCompanion({ this.songId = const Value.absent(), this.createdAtMs = const Value.absent(), this.rowid = const Value.absent(), }); FavoritesCompanion.insert({ required String songId, required int createdAtMs, this.rowid = const Value.absent(), }) : songId = Value(songId), createdAtMs = Value(createdAtMs); static Insertable custom({ Expression? songId, Expression? createdAtMs, Expression? rowid, }) { return RawValuesInsertable({ if (songId != null) 'song_id': songId, if (createdAtMs != null) 'created_at_ms': createdAtMs, if (rowid != null) 'rowid': rowid, }); } FavoritesCompanion copyWith({ Value? songId, Value? createdAtMs, Value? rowid, }) { return FavoritesCompanion( songId: songId ?? this.songId, createdAtMs: createdAtMs ?? this.createdAtMs, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (songId.present) { map['song_id'] = Variable(songId.value); } if (createdAtMs.present) { map['created_at_ms'] = Variable(createdAtMs.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('FavoritesCompanion(') ..write('songId: $songId, ') ..write('createdAtMs: $createdAtMs, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $PlaybackHistoryTable extends PlaybackHistory with TableInfo<$PlaybackHistoryTable, PlaybackHistoryData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PlaybackHistoryTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _songIdMeta = const VerificationMeta('songId'); @override late final GeneratedColumn songId = GeneratedColumn( 'song_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES songs (id)', ), ); static const VerificationMeta _positionMsMeta = const VerificationMeta( 'positionMs', ); @override late final GeneratedColumn positionMs = GeneratedColumn( 'position_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _playedAtMsMeta = const VerificationMeta( 'playedAtMs', ); @override late final GeneratedColumn playedAtMs = GeneratedColumn( 'played_at_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); @override List get $columns => [songId, positionMs, playedAtMs]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'playback_history'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('song_id')) { context.handle( _songIdMeta, songId.isAcceptableOrUnknown(data['song_id']!, _songIdMeta), ); } else if (isInserting) { context.missing(_songIdMeta); } if (data.containsKey('position_ms')) { context.handle( _positionMsMeta, positionMs.isAcceptableOrUnknown(data['position_ms']!, _positionMsMeta), ); } else if (isInserting) { context.missing(_positionMsMeta); } if (data.containsKey('played_at_ms')) { context.handle( _playedAtMsMeta, playedAtMs.isAcceptableOrUnknown( data['played_at_ms']!, _playedAtMsMeta, ), ); } else if (isInserting) { context.missing(_playedAtMsMeta); } return context; } @override Set get $primaryKey => {songId, playedAtMs}; @override PlaybackHistoryData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return PlaybackHistoryData( songId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}song_id'], )!, positionMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}position_ms'], )!, playedAtMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}played_at_ms'], )!, ); } @override $PlaybackHistoryTable createAlias(String alias) { return $PlaybackHistoryTable(attachedDatabase, alias); } } class PlaybackHistoryData extends DataClass implements Insertable { final String songId; final int positionMs; final int playedAtMs; const PlaybackHistoryData({ required this.songId, required this.positionMs, required this.playedAtMs, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['song_id'] = Variable(songId); map['position_ms'] = Variable(positionMs); map['played_at_ms'] = Variable(playedAtMs); return map; } PlaybackHistoryCompanion toCompanion(bool nullToAbsent) { return PlaybackHistoryCompanion( songId: Value(songId), positionMs: Value(positionMs), playedAtMs: Value(playedAtMs), ); } factory PlaybackHistoryData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return PlaybackHistoryData( songId: serializer.fromJson(json['songId']), positionMs: serializer.fromJson(json['positionMs']), playedAtMs: serializer.fromJson(json['playedAtMs']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'songId': serializer.toJson(songId), 'positionMs': serializer.toJson(positionMs), 'playedAtMs': serializer.toJson(playedAtMs), }; } PlaybackHistoryData copyWith({ String? songId, int? positionMs, int? playedAtMs, }) => PlaybackHistoryData( songId: songId ?? this.songId, positionMs: positionMs ?? this.positionMs, playedAtMs: playedAtMs ?? this.playedAtMs, ); PlaybackHistoryData copyWithCompanion(PlaybackHistoryCompanion data) { return PlaybackHistoryData( songId: data.songId.present ? data.songId.value : this.songId, positionMs: data.positionMs.present ? data.positionMs.value : this.positionMs, playedAtMs: data.playedAtMs.present ? data.playedAtMs.value : this.playedAtMs, ); } @override String toString() { return (StringBuffer('PlaybackHistoryData(') ..write('songId: $songId, ') ..write('positionMs: $positionMs, ') ..write('playedAtMs: $playedAtMs') ..write(')')) .toString(); } @override int get hashCode => Object.hash(songId, positionMs, playedAtMs); @override bool operator ==(Object other) => identical(this, other) || (other is PlaybackHistoryData && other.songId == this.songId && other.positionMs == this.positionMs && other.playedAtMs == this.playedAtMs); } class PlaybackHistoryCompanion extends UpdateCompanion { final Value songId; final Value positionMs; final Value playedAtMs; final Value rowid; const PlaybackHistoryCompanion({ this.songId = const Value.absent(), this.positionMs = const Value.absent(), this.playedAtMs = const Value.absent(), this.rowid = const Value.absent(), }); PlaybackHistoryCompanion.insert({ required String songId, required int positionMs, required int playedAtMs, this.rowid = const Value.absent(), }) : songId = Value(songId), positionMs = Value(positionMs), playedAtMs = Value(playedAtMs); static Insertable custom({ Expression? songId, Expression? positionMs, Expression? playedAtMs, Expression? rowid, }) { return RawValuesInsertable({ if (songId != null) 'song_id': songId, if (positionMs != null) 'position_ms': positionMs, if (playedAtMs != null) 'played_at_ms': playedAtMs, if (rowid != null) 'rowid': rowid, }); } PlaybackHistoryCompanion copyWith({ Value? songId, Value? positionMs, Value? playedAtMs, Value? rowid, }) { return PlaybackHistoryCompanion( songId: songId ?? this.songId, positionMs: positionMs ?? this.positionMs, playedAtMs: playedAtMs ?? this.playedAtMs, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (songId.present) { map['song_id'] = Variable(songId.value); } if (positionMs.present) { map['position_ms'] = Variable(positionMs.value); } if (playedAtMs.present) { map['played_at_ms'] = Variable(playedAtMs.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PlaybackHistoryCompanion(') ..write('songId: $songId, ') ..write('positionMs: $positionMs, ') ..write('playedAtMs: $playedAtMs, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $SongCategoriesTable extends SongCategories with TableInfo<$SongCategoriesTable, SongCategory> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SongCategoriesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _songIdMeta = const VerificationMeta('songId'); @override late final GeneratedColumn songId = GeneratedColumn( 'song_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES songs (id)', ), ); static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _positionMeta = const VerificationMeta( 'position', ); @override late final GeneratedColumn position = GeneratedColumn( 'position', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); @override List get $columns => [songId, name, position]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'song_categories'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('song_id')) { context.handle( _songIdMeta, songId.isAcceptableOrUnknown(data['song_id']!, _songIdMeta), ); } else if (isInserting) { context.missing(_songIdMeta); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('position')) { context.handle( _positionMeta, position.isAcceptableOrUnknown(data['position']!, _positionMeta), ); } else if (isInserting) { context.missing(_positionMeta); } return context; } @override Set get $primaryKey => {songId, name}; @override SongCategory map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SongCategory( songId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}song_id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, position: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}position'], )!, ); } @override $SongCategoriesTable createAlias(String alias) { return $SongCategoriesTable(attachedDatabase, alias); } } class SongCategory extends DataClass implements Insertable { final String songId; final String name; final int position; const SongCategory({ required this.songId, required this.name, required this.position, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['song_id'] = Variable(songId); map['name'] = Variable(name); map['position'] = Variable(position); return map; } SongCategoriesCompanion toCompanion(bool nullToAbsent) { return SongCategoriesCompanion( songId: Value(songId), name: Value(name), position: Value(position), ); } factory SongCategory.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return SongCategory( songId: serializer.fromJson(json['songId']), name: serializer.fromJson(json['name']), position: serializer.fromJson(json['position']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'songId': serializer.toJson(songId), 'name': serializer.toJson(name), 'position': serializer.toJson(position), }; } SongCategory copyWith({String? songId, String? name, int? position}) => SongCategory( songId: songId ?? this.songId, name: name ?? this.name, position: position ?? this.position, ); SongCategory copyWithCompanion(SongCategoriesCompanion data) { return SongCategory( songId: data.songId.present ? data.songId.value : this.songId, name: data.name.present ? data.name.value : this.name, position: data.position.present ? data.position.value : this.position, ); } @override String toString() { return (StringBuffer('SongCategory(') ..write('songId: $songId, ') ..write('name: $name, ') ..write('position: $position') ..write(')')) .toString(); } @override int get hashCode => Object.hash(songId, name, position); @override bool operator ==(Object other) => identical(this, other) || (other is SongCategory && other.songId == this.songId && other.name == this.name && other.position == this.position); } class SongCategoriesCompanion extends UpdateCompanion { final Value songId; final Value name; final Value position; final Value rowid; const SongCategoriesCompanion({ this.songId = const Value.absent(), this.name = const Value.absent(), this.position = const Value.absent(), this.rowid = const Value.absent(), }); SongCategoriesCompanion.insert({ required String songId, required String name, required int position, this.rowid = const Value.absent(), }) : songId = Value(songId), name = Value(name), position = Value(position); static Insertable custom({ Expression? songId, Expression? name, Expression? position, Expression? rowid, }) { return RawValuesInsertable({ if (songId != null) 'song_id': songId, if (name != null) 'name': name, if (position != null) 'position': position, if (rowid != null) 'rowid': rowid, }); } SongCategoriesCompanion copyWith({ Value? songId, Value? name, Value? position, Value? rowid, }) { return SongCategoriesCompanion( songId: songId ?? this.songId, name: name ?? this.name, position: position ?? this.position, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (songId.present) { map['song_id'] = Variable(songId.value); } if (name.present) { map['name'] = Variable(name.value); } if (position.present) { map['position'] = Variable(position.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SongCategoriesCompanion(') ..write('songId: $songId, ') ..write('name: $name, ') ..write('position: $position, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $DownloadsTable extends Downloads with TableInfo<$DownloadsTable, Download> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $DownloadsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _navidromeIdMeta = const VerificationMeta( 'navidromeId', ); @override late final GeneratedColumn navidromeId = GeneratedColumn( 'navidrome_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _titelMeta = const VerificationMeta('titel'); @override late final GeneratedColumn titel = GeneratedColumn( 'titel', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _kuenstlerMeta = const VerificationMeta( 'kuenstler', ); @override late final GeneratedColumn kuenstler = GeneratedColumn( 'kuenstler', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _albumMeta = const VerificationMeta('album'); @override late final GeneratedColumn album = GeneratedColumn( 'album', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _groesseBytesMeta = const VerificationMeta( 'groesseBytes', ); @override late final GeneratedColumn groesseBytes = GeneratedColumn( 'groesse_bytes', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _geladenAmMsMeta = const VerificationMeta( 'geladenAmMs', ); @override late final GeneratedColumn geladenAmMs = GeneratedColumn( 'geladen_am_ms', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); @override List get $columns => [ navidromeId, titel, kuenstler, album, groesseBytes, geladenAmMs, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'downloads'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('navidrome_id')) { context.handle( _navidromeIdMeta, navidromeId.isAcceptableOrUnknown( data['navidrome_id']!, _navidromeIdMeta, ), ); } else if (isInserting) { context.missing(_navidromeIdMeta); } if (data.containsKey('titel')) { context.handle( _titelMeta, titel.isAcceptableOrUnknown(data['titel']!, _titelMeta), ); } else if (isInserting) { context.missing(_titelMeta); } if (data.containsKey('kuenstler')) { context.handle( _kuenstlerMeta, kuenstler.isAcceptableOrUnknown(data['kuenstler']!, _kuenstlerMeta), ); } if (data.containsKey('album')) { context.handle( _albumMeta, album.isAcceptableOrUnknown(data['album']!, _albumMeta), ); } if (data.containsKey('groesse_bytes')) { context.handle( _groesseBytesMeta, groesseBytes.isAcceptableOrUnknown( data['groesse_bytes']!, _groesseBytesMeta, ), ); } else if (isInserting) { context.missing(_groesseBytesMeta); } if (data.containsKey('geladen_am_ms')) { context.handle( _geladenAmMsMeta, geladenAmMs.isAcceptableOrUnknown( data['geladen_am_ms']!, _geladenAmMsMeta, ), ); } else if (isInserting) { context.missing(_geladenAmMsMeta); } return context; } @override Set get $primaryKey => {navidromeId}; @override Download map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Download( navidromeId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}navidrome_id'], )!, titel: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}titel'], )!, kuenstler: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}kuenstler'], ), album: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}album'], ), groesseBytes: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}groesse_bytes'], )!, geladenAmMs: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}geladen_am_ms'], )!, ); } @override $DownloadsTable createAlias(String alias) { return $DownloadsTable(attachedDatabase, alias); } } class Download extends DataClass implements Insertable { final String navidromeId; final String titel; final String? kuenstler; final String? album; final int groesseBytes; final int geladenAmMs; const Download({ required this.navidromeId, required this.titel, this.kuenstler, this.album, required this.groesseBytes, required this.geladenAmMs, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['navidrome_id'] = Variable(navidromeId); map['titel'] = Variable(titel); if (!nullToAbsent || kuenstler != null) { map['kuenstler'] = Variable(kuenstler); } if (!nullToAbsent || album != null) { map['album'] = Variable(album); } map['groesse_bytes'] = Variable(groesseBytes); map['geladen_am_ms'] = Variable(geladenAmMs); return map; } DownloadsCompanion toCompanion(bool nullToAbsent) { return DownloadsCompanion( navidromeId: Value(navidromeId), titel: Value(titel), kuenstler: kuenstler == null && nullToAbsent ? const Value.absent() : Value(kuenstler), album: album == null && nullToAbsent ? const Value.absent() : Value(album), groesseBytes: Value(groesseBytes), geladenAmMs: Value(geladenAmMs), ); } factory Download.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Download( navidromeId: serializer.fromJson(json['navidromeId']), titel: serializer.fromJson(json['titel']), kuenstler: serializer.fromJson(json['kuenstler']), album: serializer.fromJson(json['album']), groesseBytes: serializer.fromJson(json['groesseBytes']), geladenAmMs: serializer.fromJson(json['geladenAmMs']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'navidromeId': serializer.toJson(navidromeId), 'titel': serializer.toJson(titel), 'kuenstler': serializer.toJson(kuenstler), 'album': serializer.toJson(album), 'groesseBytes': serializer.toJson(groesseBytes), 'geladenAmMs': serializer.toJson(geladenAmMs), }; } Download copyWith({ String? navidromeId, String? titel, Value kuenstler = const Value.absent(), Value album = const Value.absent(), int? groesseBytes, int? geladenAmMs, }) => Download( navidromeId: navidromeId ?? this.navidromeId, titel: titel ?? this.titel, kuenstler: kuenstler.present ? kuenstler.value : this.kuenstler, album: album.present ? album.value : this.album, groesseBytes: groesseBytes ?? this.groesseBytes, geladenAmMs: geladenAmMs ?? this.geladenAmMs, ); Download copyWithCompanion(DownloadsCompanion data) { return Download( navidromeId: data.navidromeId.present ? data.navidromeId.value : this.navidromeId, titel: data.titel.present ? data.titel.value : this.titel, kuenstler: data.kuenstler.present ? data.kuenstler.value : this.kuenstler, album: data.album.present ? data.album.value : this.album, groesseBytes: data.groesseBytes.present ? data.groesseBytes.value : this.groesseBytes, geladenAmMs: data.geladenAmMs.present ? data.geladenAmMs.value : this.geladenAmMs, ); } @override String toString() { return (StringBuffer('Download(') ..write('navidromeId: $navidromeId, ') ..write('titel: $titel, ') ..write('kuenstler: $kuenstler, ') ..write('album: $album, ') ..write('groesseBytes: $groesseBytes, ') ..write('geladenAmMs: $geladenAmMs') ..write(')')) .toString(); } @override int get hashCode => Object.hash( navidromeId, titel, kuenstler, album, groesseBytes, geladenAmMs, ); @override bool operator ==(Object other) => identical(this, other) || (other is Download && other.navidromeId == this.navidromeId && other.titel == this.titel && other.kuenstler == this.kuenstler && other.album == this.album && other.groesseBytes == this.groesseBytes && other.geladenAmMs == this.geladenAmMs); } class DownloadsCompanion extends UpdateCompanion { final Value navidromeId; final Value titel; final Value kuenstler; final Value album; final Value groesseBytes; final Value geladenAmMs; final Value rowid; const DownloadsCompanion({ this.navidromeId = const Value.absent(), this.titel = const Value.absent(), this.kuenstler = const Value.absent(), this.album = const Value.absent(), this.groesseBytes = const Value.absent(), this.geladenAmMs = const Value.absent(), this.rowid = const Value.absent(), }); DownloadsCompanion.insert({ required String navidromeId, required String titel, this.kuenstler = const Value.absent(), this.album = const Value.absent(), required int groesseBytes, required int geladenAmMs, this.rowid = const Value.absent(), }) : navidromeId = Value(navidromeId), titel = Value(titel), groesseBytes = Value(groesseBytes), geladenAmMs = Value(geladenAmMs); static Insertable custom({ Expression? navidromeId, Expression? titel, Expression? kuenstler, Expression? album, Expression? groesseBytes, Expression? geladenAmMs, Expression? rowid, }) { return RawValuesInsertable({ if (navidromeId != null) 'navidrome_id': navidromeId, if (titel != null) 'titel': titel, if (kuenstler != null) 'kuenstler': kuenstler, if (album != null) 'album': album, if (groesseBytes != null) 'groesse_bytes': groesseBytes, if (geladenAmMs != null) 'geladen_am_ms': geladenAmMs, if (rowid != null) 'rowid': rowid, }); } DownloadsCompanion copyWith({ Value? navidromeId, Value? titel, Value? kuenstler, Value? album, Value? groesseBytes, Value? geladenAmMs, Value? rowid, }) { return DownloadsCompanion( navidromeId: navidromeId ?? this.navidromeId, titel: titel ?? this.titel, kuenstler: kuenstler ?? this.kuenstler, album: album ?? this.album, groesseBytes: groesseBytes ?? this.groesseBytes, geladenAmMs: geladenAmMs ?? this.geladenAmMs, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (navidromeId.present) { map['navidrome_id'] = Variable(navidromeId.value); } if (titel.present) { map['titel'] = Variable(titel.value); } if (kuenstler.present) { map['kuenstler'] = Variable(kuenstler.value); } if (album.present) { map['album'] = Variable(album.value); } if (groesseBytes.present) { map['groesse_bytes'] = Variable(groesseBytes.value); } if (geladenAmMs.present) { map['geladen_am_ms'] = Variable(geladenAmMs.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('DownloadsCompanion(') ..write('navidromeId: $navidromeId, ') ..write('titel: $titel, ') ..write('kuenstler: $kuenstler, ') ..write('album: $album, ') ..write('groesseBytes: $groesseBytes, ') ..write('geladenAmMs: $geladenAmMs, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } abstract class _$MeloDb extends GeneratedDatabase { _$MeloDb(QueryExecutor e) : super(e); $MeloDbManager get managers => $MeloDbManager(this); late final $SongsTable songs = $SongsTable(this); late final $FoldersTable folders = $FoldersTable(this); late final $PlaylistsTable playlists = $PlaylistsTable(this); late final $PlaylistSongsTable playlistSongs = $PlaylistSongsTable(this); late final $FavoritesTable favorites = $FavoritesTable(this); late final $PlaybackHistoryTable playbackHistory = $PlaybackHistoryTable( this, ); late final $SongCategoriesTable songCategories = $SongCategoriesTable(this); late final $DownloadsTable downloads = $DownloadsTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ songs, folders, playlists, playlistSongs, favorites, playbackHistory, songCategories, downloads, ]; } typedef $$SongsTableCreateCompanionBuilder = SongsCompanion Function({ required String id, required String path, required String title, Value artist, Value album, Value durationMs, Value coverPath, required int dateAddedMs, required int updatedAtMs, Value deleted, Value playCount, Value categoriesEdited, Value metadataEdited, Value lyrics, Value gainDb, Value cloudId, Value rowid, }); typedef $$SongsTableUpdateCompanionBuilder = SongsCompanion Function({ Value id, Value path, Value title, Value artist, Value album, Value durationMs, Value coverPath, Value dateAddedMs, Value updatedAtMs, Value deleted, Value playCount, Value categoriesEdited, Value metadataEdited, Value lyrics, Value gainDb, Value cloudId, Value rowid, }); final class $$SongsTableReferences extends BaseReferences<_$MeloDb, $SongsTable, Song> { $$SongsTableReferences(super.$_db, super.$_table, super.$_typedResult); static MultiTypedResultKey<$PlaylistSongsTable, List> _playlistSongsRefsTable(_$MeloDb db) => MultiTypedResultKey.fromTable( db.playlistSongs, aliasName: 'songs__id__playlist_songs__song_id', ); $$PlaylistSongsTableProcessedTableManager get playlistSongsRefs { final manager = $$PlaylistSongsTableTableManager( $_db, $_db.playlistSongs, ).filter((f) => f.songId.id.sqlEquals($_itemColumn('id')!)); final cache = $_typedResult.readTableOrNull(_playlistSongsRefsTable($_db)); return ProcessedTableManager( manager.$state.copyWith(prefetchedData: cache), ); } static MultiTypedResultKey<$FavoritesTable, List> _favoritesRefsTable(_$MeloDb db) => MultiTypedResultKey.fromTable( db.favorites, aliasName: 'songs__id__favorites__song_id', ); $$FavoritesTableProcessedTableManager get favoritesRefs { final manager = $$FavoritesTableTableManager( $_db, $_db.favorites, ).filter((f) => f.songId.id.sqlEquals($_itemColumn('id')!)); final cache = $_typedResult.readTableOrNull(_favoritesRefsTable($_db)); return ProcessedTableManager( manager.$state.copyWith(prefetchedData: cache), ); } static MultiTypedResultKey<$PlaybackHistoryTable, List> _playbackHistoryRefsTable(_$MeloDb db) => MultiTypedResultKey.fromTable( db.playbackHistory, aliasName: 'songs__id__playback_history__song_id', ); $$PlaybackHistoryTableProcessedTableManager get playbackHistoryRefs { final manager = $$PlaybackHistoryTableTableManager( $_db, $_db.playbackHistory, ).filter((f) => f.songId.id.sqlEquals($_itemColumn('id')!)); final cache = $_typedResult.readTableOrNull( _playbackHistoryRefsTable($_db), ); return ProcessedTableManager( manager.$state.copyWith(prefetchedData: cache), ); } static MultiTypedResultKey<$SongCategoriesTable, List> _songCategoriesRefsTable(_$MeloDb db) => MultiTypedResultKey.fromTable( db.songCategories, aliasName: 'songs__id__song_categories__song_id', ); $$SongCategoriesTableProcessedTableManager get songCategoriesRefs { final manager = $$SongCategoriesTableTableManager( $_db, $_db.songCategories, ).filter((f) => f.songId.id.sqlEquals($_itemColumn('id')!)); final cache = $_typedResult.readTableOrNull(_songCategoriesRefsTable($_db)); return ProcessedTableManager( manager.$state.copyWith(prefetchedData: cache), ); } } class $$SongsTableFilterComposer extends Composer<_$MeloDb, $SongsTable> { $$SongsTableFilterComposer({ 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 path => $composableBuilder( column: $table.path, builder: (column) => ColumnFilters(column), ); ColumnFilters get title => $composableBuilder( column: $table.title, builder: (column) => ColumnFilters(column), ); ColumnFilters get artist => $composableBuilder( column: $table.artist, builder: (column) => ColumnFilters(column), ); ColumnFilters get album => $composableBuilder( column: $table.album, builder: (column) => ColumnFilters(column), ); ColumnFilters get durationMs => $composableBuilder( column: $table.durationMs, builder: (column) => ColumnFilters(column), ); ColumnFilters get coverPath => $composableBuilder( column: $table.coverPath, builder: (column) => ColumnFilters(column), ); ColumnFilters get dateAddedMs => $composableBuilder( column: $table.dateAddedMs, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => ColumnFilters(column), ); ColumnFilters get deleted => $composableBuilder( column: $table.deleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get playCount => $composableBuilder( column: $table.playCount, builder: (column) => ColumnFilters(column), ); ColumnFilters get categoriesEdited => $composableBuilder( column: $table.categoriesEdited, builder: (column) => ColumnFilters(column), ); ColumnFilters get metadataEdited => $composableBuilder( column: $table.metadataEdited, builder: (column) => ColumnFilters(column), ); ColumnFilters get lyrics => $composableBuilder( column: $table.lyrics, builder: (column) => ColumnFilters(column), ); ColumnFilters get gainDb => $composableBuilder( column: $table.gainDb, builder: (column) => ColumnFilters(column), ); ColumnFilters get cloudId => $composableBuilder( column: $table.cloudId, builder: (column) => ColumnFilters(column), ); Expression playlistSongsRefs( Expression Function($$PlaylistSongsTableFilterComposer f) f, ) { final $$PlaylistSongsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.playlistSongs, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaylistSongsTableFilterComposer( $db: $db, $table: $db.playlistSongs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } Expression favoritesRefs( Expression Function($$FavoritesTableFilterComposer f) f, ) { final $$FavoritesTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.favorites, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$FavoritesTableFilterComposer( $db: $db, $table: $db.favorites, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } Expression playbackHistoryRefs( Expression Function($$PlaybackHistoryTableFilterComposer f) f, ) { final $$PlaybackHistoryTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.playbackHistory, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaybackHistoryTableFilterComposer( $db: $db, $table: $db.playbackHistory, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } Expression songCategoriesRefs( Expression Function($$SongCategoriesTableFilterComposer f) f, ) { final $$SongCategoriesTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.songCategories, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongCategoriesTableFilterComposer( $db: $db, $table: $db.songCategories, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } } class $$SongsTableOrderingComposer extends Composer<_$MeloDb, $SongsTable> { $$SongsTableOrderingComposer({ 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 path => $composableBuilder( column: $table.path, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get title => $composableBuilder( column: $table.title, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get artist => $composableBuilder( column: $table.artist, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get album => $composableBuilder( column: $table.album, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get durationMs => $composableBuilder( column: $table.durationMs, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get coverPath => $composableBuilder( column: $table.coverPath, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get dateAddedMs => $composableBuilder( column: $table.dateAddedMs, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get deleted => $composableBuilder( column: $table.deleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get playCount => $composableBuilder( column: $table.playCount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get categoriesEdited => $composableBuilder( column: $table.categoriesEdited, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get metadataEdited => $composableBuilder( column: $table.metadataEdited, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lyrics => $composableBuilder( column: $table.lyrics, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get gainDb => $composableBuilder( column: $table.gainDb, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get cloudId => $composableBuilder( column: $table.cloudId, builder: (column) => ColumnOrderings(column), ); } class $$SongsTableAnnotationComposer extends Composer<_$MeloDb, $SongsTable> { $$SongsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get path => $composableBuilder(column: $table.path, builder: (column) => column); GeneratedColumn get title => $composableBuilder(column: $table.title, builder: (column) => column); GeneratedColumn get artist => $composableBuilder(column: $table.artist, builder: (column) => column); GeneratedColumn get album => $composableBuilder(column: $table.album, builder: (column) => column); GeneratedColumn get durationMs => $composableBuilder( column: $table.durationMs, builder: (column) => column, ); GeneratedColumn get coverPath => $composableBuilder(column: $table.coverPath, builder: (column) => column); GeneratedColumn get dateAddedMs => $composableBuilder( column: $table.dateAddedMs, builder: (column) => column, ); GeneratedColumn get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => column, ); GeneratedColumn get deleted => $composableBuilder(column: $table.deleted, builder: (column) => column); GeneratedColumn get playCount => $composableBuilder(column: $table.playCount, builder: (column) => column); GeneratedColumn get categoriesEdited => $composableBuilder( column: $table.categoriesEdited, builder: (column) => column, ); GeneratedColumn get metadataEdited => $composableBuilder( column: $table.metadataEdited, builder: (column) => column, ); GeneratedColumn get lyrics => $composableBuilder(column: $table.lyrics, builder: (column) => column); GeneratedColumn get gainDb => $composableBuilder(column: $table.gainDb, builder: (column) => column); GeneratedColumn get cloudId => $composableBuilder(column: $table.cloudId, builder: (column) => column); Expression playlistSongsRefs( Expression Function($$PlaylistSongsTableAnnotationComposer a) f, ) { final $$PlaylistSongsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.playlistSongs, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaylistSongsTableAnnotationComposer( $db: $db, $table: $db.playlistSongs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } Expression favoritesRefs( Expression Function($$FavoritesTableAnnotationComposer a) f, ) { final $$FavoritesTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.favorites, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$FavoritesTableAnnotationComposer( $db: $db, $table: $db.favorites, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } Expression playbackHistoryRefs( Expression Function($$PlaybackHistoryTableAnnotationComposer a) f, ) { final $$PlaybackHistoryTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.playbackHistory, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaybackHistoryTableAnnotationComposer( $db: $db, $table: $db.playbackHistory, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } Expression songCategoriesRefs( Expression Function($$SongCategoriesTableAnnotationComposer a) f, ) { final $$SongCategoriesTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.songCategories, getReferencedColumn: (t) => t.songId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongCategoriesTableAnnotationComposer( $db: $db, $table: $db.songCategories, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } } class $$SongsTableTableManager extends RootTableManager< _$MeloDb, $SongsTable, Song, $$SongsTableFilterComposer, $$SongsTableOrderingComposer, $$SongsTableAnnotationComposer, $$SongsTableCreateCompanionBuilder, $$SongsTableUpdateCompanionBuilder, (Song, $$SongsTableReferences), Song, PrefetchHooks Function({ bool playlistSongsRefs, bool favoritesRefs, bool playbackHistoryRefs, bool songCategoriesRefs, }) > { $$SongsTableTableManager(_$MeloDb db, $SongsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SongsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SongsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SongsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value path = const Value.absent(), Value title = const Value.absent(), Value artist = const Value.absent(), Value album = const Value.absent(), Value durationMs = const Value.absent(), Value coverPath = const Value.absent(), Value dateAddedMs = const Value.absent(), Value updatedAtMs = const Value.absent(), Value deleted = const Value.absent(), Value playCount = const Value.absent(), Value categoriesEdited = const Value.absent(), Value metadataEdited = const Value.absent(), Value lyrics = const Value.absent(), Value gainDb = const Value.absent(), Value cloudId = const Value.absent(), Value rowid = const Value.absent(), }) => SongsCompanion( id: id, path: path, title: title, artist: artist, album: album, durationMs: durationMs, coverPath: coverPath, dateAddedMs: dateAddedMs, updatedAtMs: updatedAtMs, deleted: deleted, playCount: playCount, categoriesEdited: categoriesEdited, metadataEdited: metadataEdited, lyrics: lyrics, gainDb: gainDb, cloudId: cloudId, rowid: rowid, ), createCompanionCallback: ({ required String id, required String path, required String title, Value artist = const Value.absent(), Value album = const Value.absent(), Value durationMs = const Value.absent(), Value coverPath = const Value.absent(), required int dateAddedMs, required int updatedAtMs, Value deleted = const Value.absent(), Value playCount = const Value.absent(), Value categoriesEdited = const Value.absent(), Value metadataEdited = const Value.absent(), Value lyrics = const Value.absent(), Value gainDb = const Value.absent(), Value cloudId = const Value.absent(), Value rowid = const Value.absent(), }) => SongsCompanion.insert( id: id, path: path, title: title, artist: artist, album: album, durationMs: durationMs, coverPath: coverPath, dateAddedMs: dateAddedMs, updatedAtMs: updatedAtMs, deleted: deleted, playCount: playCount, categoriesEdited: categoriesEdited, metadataEdited: metadataEdited, lyrics: lyrics, gainDb: gainDb, cloudId: cloudId, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => (e.readTable(table), $$SongsTableReferences(db, table, e)), ) .toList(), prefetchHooksCallback: ({ playlistSongsRefs = false, favoritesRefs = false, playbackHistoryRefs = false, songCategoriesRefs = false, }) { return PrefetchHooks( db: db, explicitlyWatchedTables: [ if (playlistSongsRefs) db.playlistSongs, if (favoritesRefs) db.favorites, if (playbackHistoryRefs) db.playbackHistory, if (songCategoriesRefs) db.songCategories, ], addJoins: null, getPrefetchedDataCallback: (items) async { return [ if (playlistSongsRefs) await $_getPrefetchedData< Song, $SongsTable, PlaylistSong >( currentTable: table, referencedTable: $$SongsTableReferences ._playlistSongsRefsTable(db), managerFromTypedResult: (p0) => $$SongsTableReferences( db, table, p0, ).playlistSongsRefs, referencedItemsForCurrentItem: (item, referencedItems) => referencedItems.where( (e) => e.songId == item.id, ), typedResults: items, ), if (favoritesRefs) await $_getPrefetchedData( currentTable: table, referencedTable: $$SongsTableReferences ._favoritesRefsTable(db), managerFromTypedResult: (p0) => $$SongsTableReferences( db, table, p0, ).favoritesRefs, referencedItemsForCurrentItem: (item, referencedItems) => referencedItems.where( (e) => e.songId == item.id, ), typedResults: items, ), if (playbackHistoryRefs) await $_getPrefetchedData< Song, $SongsTable, PlaybackHistoryData >( currentTable: table, referencedTable: $$SongsTableReferences ._playbackHistoryRefsTable(db), managerFromTypedResult: (p0) => $$SongsTableReferences( db, table, p0, ).playbackHistoryRefs, referencedItemsForCurrentItem: (item, referencedItems) => referencedItems.where( (e) => e.songId == item.id, ), typedResults: items, ), if (songCategoriesRefs) await $_getPrefetchedData< Song, $SongsTable, SongCategory >( currentTable: table, referencedTable: $$SongsTableReferences ._songCategoriesRefsTable(db), managerFromTypedResult: (p0) => $$SongsTableReferences( db, table, p0, ).songCategoriesRefs, referencedItemsForCurrentItem: (item, referencedItems) => referencedItems.where( (e) => e.songId == item.id, ), typedResults: items, ), ]; }, ); }, ), ); } typedef $$SongsTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $SongsTable, Song, $$SongsTableFilterComposer, $$SongsTableOrderingComposer, $$SongsTableAnnotationComposer, $$SongsTableCreateCompanionBuilder, $$SongsTableUpdateCompanionBuilder, (Song, $$SongsTableReferences), Song, PrefetchHooks Function({ bool playlistSongsRefs, bool favoritesRefs, bool playbackHistoryRefs, bool songCategoriesRefs, }) >; typedef $$FoldersTableCreateCompanionBuilder = FoldersCompanion Function({ required String id, required String path, required int updatedAtMs, Value deleted, Value rowid, }); typedef $$FoldersTableUpdateCompanionBuilder = FoldersCompanion Function({ Value id, Value path, Value updatedAtMs, Value deleted, Value rowid, }); class $$FoldersTableFilterComposer extends Composer<_$MeloDb, $FoldersTable> { $$FoldersTableFilterComposer({ 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 path => $composableBuilder( column: $table.path, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => ColumnFilters(column), ); ColumnFilters get deleted => $composableBuilder( column: $table.deleted, builder: (column) => ColumnFilters(column), ); } class $$FoldersTableOrderingComposer extends Composer<_$MeloDb, $FoldersTable> { $$FoldersTableOrderingComposer({ 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 path => $composableBuilder( column: $table.path, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get deleted => $composableBuilder( column: $table.deleted, builder: (column) => ColumnOrderings(column), ); } class $$FoldersTableAnnotationComposer extends Composer<_$MeloDb, $FoldersTable> { $$FoldersTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get path => $composableBuilder(column: $table.path, builder: (column) => column); GeneratedColumn get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => column, ); GeneratedColumn get deleted => $composableBuilder(column: $table.deleted, builder: (column) => column); } class $$FoldersTableTableManager extends RootTableManager< _$MeloDb, $FoldersTable, Folder, $$FoldersTableFilterComposer, $$FoldersTableOrderingComposer, $$FoldersTableAnnotationComposer, $$FoldersTableCreateCompanionBuilder, $$FoldersTableUpdateCompanionBuilder, (Folder, BaseReferences<_$MeloDb, $FoldersTable, Folder>), Folder, PrefetchHooks Function() > { $$FoldersTableTableManager(_$MeloDb db, $FoldersTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$FoldersTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$FoldersTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$FoldersTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value path = const Value.absent(), Value updatedAtMs = const Value.absent(), Value deleted = const Value.absent(), Value rowid = const Value.absent(), }) => FoldersCompanion( id: id, path: path, updatedAtMs: updatedAtMs, deleted: deleted, rowid: rowid, ), createCompanionCallback: ({ required String id, required String path, required int updatedAtMs, Value deleted = const Value.absent(), Value rowid = const Value.absent(), }) => FoldersCompanion.insert( id: id, path: path, updatedAtMs: updatedAtMs, deleted: deleted, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$FoldersTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $FoldersTable, Folder, $$FoldersTableFilterComposer, $$FoldersTableOrderingComposer, $$FoldersTableAnnotationComposer, $$FoldersTableCreateCompanionBuilder, $$FoldersTableUpdateCompanionBuilder, (Folder, BaseReferences<_$MeloDb, $FoldersTable, Folder>), Folder, PrefetchHooks Function() >; typedef $$PlaylistsTableCreateCompanionBuilder = PlaylistsCompanion Function({ required String id, required String name, Value description, required int createdAtMs, required int updatedAtMs, Value deleted, Value cloudId, Value rowid, }); typedef $$PlaylistsTableUpdateCompanionBuilder = PlaylistsCompanion Function({ Value id, Value name, Value description, Value createdAtMs, Value updatedAtMs, Value deleted, Value cloudId, Value rowid, }); final class $$PlaylistsTableReferences extends BaseReferences<_$MeloDb, $PlaylistsTable, Playlist> { $$PlaylistsTableReferences(super.$_db, super.$_table, super.$_typedResult); static MultiTypedResultKey<$PlaylistSongsTable, List> _playlistSongsRefsTable(_$MeloDb db) => MultiTypedResultKey.fromTable( db.playlistSongs, aliasName: 'playlists__id__playlist_songs__playlist_id', ); $$PlaylistSongsTableProcessedTableManager get playlistSongsRefs { final manager = $$PlaylistSongsTableTableManager( $_db, $_db.playlistSongs, ).filter((f) => f.playlistId.id.sqlEquals($_itemColumn('id')!)); final cache = $_typedResult.readTableOrNull(_playlistSongsRefsTable($_db)); return ProcessedTableManager( manager.$state.copyWith(prefetchedData: cache), ); } } class $$PlaylistsTableFilterComposer extends Composer<_$MeloDb, $PlaylistsTable> { $$PlaylistsTableFilterComposer({ 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 name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get description => $composableBuilder( column: $table.description, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAtMs => $composableBuilder( column: $table.createdAtMs, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => ColumnFilters(column), ); ColumnFilters get deleted => $composableBuilder( column: $table.deleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get cloudId => $composableBuilder( column: $table.cloudId, builder: (column) => ColumnFilters(column), ); Expression playlistSongsRefs( Expression Function($$PlaylistSongsTableFilterComposer f) f, ) { final $$PlaylistSongsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.playlistSongs, getReferencedColumn: (t) => t.playlistId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaylistSongsTableFilterComposer( $db: $db, $table: $db.playlistSongs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } } class $$PlaylistsTableOrderingComposer extends Composer<_$MeloDb, $PlaylistsTable> { $$PlaylistsTableOrderingComposer({ 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 name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get description => $composableBuilder( column: $table.description, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAtMs => $composableBuilder( column: $table.createdAtMs, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get deleted => $composableBuilder( column: $table.deleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get cloudId => $composableBuilder( column: $table.cloudId, builder: (column) => ColumnOrderings(column), ); } class $$PlaylistsTableAnnotationComposer extends Composer<_$MeloDb, $PlaylistsTable> { $$PlaylistsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get description => $composableBuilder( column: $table.description, builder: (column) => column, ); GeneratedColumn get createdAtMs => $composableBuilder( column: $table.createdAtMs, builder: (column) => column, ); GeneratedColumn get updatedAtMs => $composableBuilder( column: $table.updatedAtMs, builder: (column) => column, ); GeneratedColumn get deleted => $composableBuilder(column: $table.deleted, builder: (column) => column); GeneratedColumn get cloudId => $composableBuilder(column: $table.cloudId, builder: (column) => column); Expression playlistSongsRefs( Expression Function($$PlaylistSongsTableAnnotationComposer a) f, ) { final $$PlaylistSongsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.playlistSongs, getReferencedColumn: (t) => t.playlistId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaylistSongsTableAnnotationComposer( $db: $db, $table: $db.playlistSongs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } } class $$PlaylistsTableTableManager extends RootTableManager< _$MeloDb, $PlaylistsTable, Playlist, $$PlaylistsTableFilterComposer, $$PlaylistsTableOrderingComposer, $$PlaylistsTableAnnotationComposer, $$PlaylistsTableCreateCompanionBuilder, $$PlaylistsTableUpdateCompanionBuilder, (Playlist, $$PlaylistsTableReferences), Playlist, PrefetchHooks Function({bool playlistSongsRefs}) > { $$PlaylistsTableTableManager(_$MeloDb db, $PlaylistsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$PlaylistsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$PlaylistsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$PlaylistsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value name = const Value.absent(), Value description = const Value.absent(), Value createdAtMs = const Value.absent(), Value updatedAtMs = const Value.absent(), Value deleted = const Value.absent(), Value cloudId = const Value.absent(), Value rowid = const Value.absent(), }) => PlaylistsCompanion( id: id, name: name, description: description, createdAtMs: createdAtMs, updatedAtMs: updatedAtMs, deleted: deleted, cloudId: cloudId, rowid: rowid, ), createCompanionCallback: ({ required String id, required String name, Value description = const Value.absent(), required int createdAtMs, required int updatedAtMs, Value deleted = const Value.absent(), Value cloudId = const Value.absent(), Value rowid = const Value.absent(), }) => PlaylistsCompanion.insert( id: id, name: name, description: description, createdAtMs: createdAtMs, updatedAtMs: updatedAtMs, deleted: deleted, cloudId: cloudId, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => ( e.readTable(table), $$PlaylistsTableReferences(db, table, e), ), ) .toList(), prefetchHooksCallback: ({playlistSongsRefs = false}) { return PrefetchHooks( db: db, explicitlyWatchedTables: [ if (playlistSongsRefs) db.playlistSongs, ], addJoins: null, getPrefetchedDataCallback: (items) async { return [ if (playlistSongsRefs) await $_getPrefetchedData< Playlist, $PlaylistsTable, PlaylistSong >( currentTable: table, referencedTable: $$PlaylistsTableReferences ._playlistSongsRefsTable(db), managerFromTypedResult: (p0) => $$PlaylistsTableReferences( db, table, p0, ).playlistSongsRefs, referencedItemsForCurrentItem: (item, referencedItems) => referencedItems.where((e) => e.playlistId == item.id), typedResults: items, ), ]; }, ); }, ), ); } typedef $$PlaylistsTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $PlaylistsTable, Playlist, $$PlaylistsTableFilterComposer, $$PlaylistsTableOrderingComposer, $$PlaylistsTableAnnotationComposer, $$PlaylistsTableCreateCompanionBuilder, $$PlaylistsTableUpdateCompanionBuilder, (Playlist, $$PlaylistsTableReferences), Playlist, PrefetchHooks Function({bool playlistSongsRefs}) >; typedef $$PlaylistSongsTableCreateCompanionBuilder = PlaylistSongsCompanion Function({ required String playlistId, required String songId, required int position, required int addedAtMs, Value rowid, }); typedef $$PlaylistSongsTableUpdateCompanionBuilder = PlaylistSongsCompanion Function({ Value playlistId, Value songId, Value position, Value addedAtMs, Value rowid, }); final class $$PlaylistSongsTableReferences extends BaseReferences<_$MeloDb, $PlaylistSongsTable, PlaylistSong> { $$PlaylistSongsTableReferences( super.$_db, super.$_table, super.$_typedResult, ); static $PlaylistsTable _playlistIdTable(_$MeloDb db) => db.playlists.createAlias('playlist_songs__playlist_id__playlists__id'); $$PlaylistsTableProcessedTableManager get playlistId { final $_column = $_itemColumn('playlist_id')!; final manager = $$PlaylistsTableTableManager( $_db, $_db.playlists, ).filter((f) => f.id.sqlEquals($_column)); final item = $_typedResult.readTableOrNull(_playlistIdTable($_db)); if (item == null) return manager; return ProcessedTableManager( manager.$state.copyWith(prefetchedData: [item]), ); } static $SongsTable _songIdTable(_$MeloDb db) => db.songs.createAlias('playlist_songs__song_id__songs__id'); $$SongsTableProcessedTableManager get songId { final $_column = $_itemColumn('song_id')!; final manager = $$SongsTableTableManager( $_db, $_db.songs, ).filter((f) => f.id.sqlEquals($_column)); final item = $_typedResult.readTableOrNull(_songIdTable($_db)); if (item == null) return manager; return ProcessedTableManager( manager.$state.copyWith(prefetchedData: [item]), ); } } class $$PlaylistSongsTableFilterComposer extends Composer<_$MeloDb, $PlaylistSongsTable> { $$PlaylistSongsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get position => $composableBuilder( column: $table.position, builder: (column) => ColumnFilters(column), ); ColumnFilters get addedAtMs => $composableBuilder( column: $table.addedAtMs, builder: (column) => ColumnFilters(column), ); $$PlaylistsTableFilterComposer get playlistId { final $$PlaylistsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.playlistId, referencedTable: $db.playlists, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaylistsTableFilterComposer( $db: $db, $table: $db.playlists, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } $$SongsTableFilterComposer get songId { final $$SongsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableFilterComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$PlaylistSongsTableOrderingComposer extends Composer<_$MeloDb, $PlaylistSongsTable> { $$PlaylistSongsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get position => $composableBuilder( column: $table.position, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get addedAtMs => $composableBuilder( column: $table.addedAtMs, builder: (column) => ColumnOrderings(column), ); $$PlaylistsTableOrderingComposer get playlistId { final $$PlaylistsTableOrderingComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.playlistId, referencedTable: $db.playlists, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaylistsTableOrderingComposer( $db: $db, $table: $db.playlists, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } $$SongsTableOrderingComposer get songId { final $$SongsTableOrderingComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableOrderingComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$PlaylistSongsTableAnnotationComposer extends Composer<_$MeloDb, $PlaylistSongsTable> { $$PlaylistSongsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get position => $composableBuilder(column: $table.position, builder: (column) => column); GeneratedColumn get addedAtMs => $composableBuilder(column: $table.addedAtMs, builder: (column) => column); $$PlaylistsTableAnnotationComposer get playlistId { final $$PlaylistsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.playlistId, referencedTable: $db.playlists, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$PlaylistsTableAnnotationComposer( $db: $db, $table: $db.playlists, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } $$SongsTableAnnotationComposer get songId { final $$SongsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableAnnotationComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$PlaylistSongsTableTableManager extends RootTableManager< _$MeloDb, $PlaylistSongsTable, PlaylistSong, $$PlaylistSongsTableFilterComposer, $$PlaylistSongsTableOrderingComposer, $$PlaylistSongsTableAnnotationComposer, $$PlaylistSongsTableCreateCompanionBuilder, $$PlaylistSongsTableUpdateCompanionBuilder, (PlaylistSong, $$PlaylistSongsTableReferences), PlaylistSong, PrefetchHooks Function({bool playlistId, bool songId}) > { $$PlaylistSongsTableTableManager(_$MeloDb db, $PlaylistSongsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$PlaylistSongsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$PlaylistSongsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$PlaylistSongsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value playlistId = const Value.absent(), Value songId = const Value.absent(), Value position = const Value.absent(), Value addedAtMs = const Value.absent(), Value rowid = const Value.absent(), }) => PlaylistSongsCompanion( playlistId: playlistId, songId: songId, position: position, addedAtMs: addedAtMs, rowid: rowid, ), createCompanionCallback: ({ required String playlistId, required String songId, required int position, required int addedAtMs, Value rowid = const Value.absent(), }) => PlaylistSongsCompanion.insert( playlistId: playlistId, songId: songId, position: position, addedAtMs: addedAtMs, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => ( e.readTable(table), $$PlaylistSongsTableReferences(db, table, e), ), ) .toList(), prefetchHooksCallback: ({playlistId = false, songId = false}) { return PrefetchHooks( db: db, explicitlyWatchedTables: [], addJoins: < T extends TableManagerState< dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic > >(state) { if (playlistId) { state = state.withJoin( currentTable: table, currentColumn: table.playlistId, referencedTable: $$PlaylistSongsTableReferences ._playlistIdTable(db), referencedColumn: $$PlaylistSongsTableReferences ._playlistIdTable(db) .id, ) as T; } if (songId) { state = state.withJoin( currentTable: table, currentColumn: table.songId, referencedTable: $$PlaylistSongsTableReferences ._songIdTable(db), referencedColumn: $$PlaylistSongsTableReferences ._songIdTable(db) .id, ) as T; } return state; }, getPrefetchedDataCallback: (items) async { return []; }, ); }, ), ); } typedef $$PlaylistSongsTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $PlaylistSongsTable, PlaylistSong, $$PlaylistSongsTableFilterComposer, $$PlaylistSongsTableOrderingComposer, $$PlaylistSongsTableAnnotationComposer, $$PlaylistSongsTableCreateCompanionBuilder, $$PlaylistSongsTableUpdateCompanionBuilder, (PlaylistSong, $$PlaylistSongsTableReferences), PlaylistSong, PrefetchHooks Function({bool playlistId, bool songId}) >; typedef $$FavoritesTableCreateCompanionBuilder = FavoritesCompanion Function({ required String songId, required int createdAtMs, Value rowid, }); typedef $$FavoritesTableUpdateCompanionBuilder = FavoritesCompanion Function({ Value songId, Value createdAtMs, Value rowid, }); final class $$FavoritesTableReferences extends BaseReferences<_$MeloDb, $FavoritesTable, Favorite> { $$FavoritesTableReferences(super.$_db, super.$_table, super.$_typedResult); static $SongsTable _songIdTable(_$MeloDb db) => db.songs.createAlias('favorites__song_id__songs__id'); $$SongsTableProcessedTableManager get songId { final $_column = $_itemColumn('song_id')!; final manager = $$SongsTableTableManager( $_db, $_db.songs, ).filter((f) => f.id.sqlEquals($_column)); final item = $_typedResult.readTableOrNull(_songIdTable($_db)); if (item == null) return manager; return ProcessedTableManager( manager.$state.copyWith(prefetchedData: [item]), ); } } class $$FavoritesTableFilterComposer extends Composer<_$MeloDb, $FavoritesTable> { $$FavoritesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get createdAtMs => $composableBuilder( column: $table.createdAtMs, builder: (column) => ColumnFilters(column), ); $$SongsTableFilterComposer get songId { final $$SongsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableFilterComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$FavoritesTableOrderingComposer extends Composer<_$MeloDb, $FavoritesTable> { $$FavoritesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get createdAtMs => $composableBuilder( column: $table.createdAtMs, builder: (column) => ColumnOrderings(column), ); $$SongsTableOrderingComposer get songId { final $$SongsTableOrderingComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableOrderingComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$FavoritesTableAnnotationComposer extends Composer<_$MeloDb, $FavoritesTable> { $$FavoritesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get createdAtMs => $composableBuilder( column: $table.createdAtMs, builder: (column) => column, ); $$SongsTableAnnotationComposer get songId { final $$SongsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableAnnotationComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$FavoritesTableTableManager extends RootTableManager< _$MeloDb, $FavoritesTable, Favorite, $$FavoritesTableFilterComposer, $$FavoritesTableOrderingComposer, $$FavoritesTableAnnotationComposer, $$FavoritesTableCreateCompanionBuilder, $$FavoritesTableUpdateCompanionBuilder, (Favorite, $$FavoritesTableReferences), Favorite, PrefetchHooks Function({bool songId}) > { $$FavoritesTableTableManager(_$MeloDb db, $FavoritesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$FavoritesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$FavoritesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$FavoritesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value songId = const Value.absent(), Value createdAtMs = const Value.absent(), Value rowid = const Value.absent(), }) => FavoritesCompanion( songId: songId, createdAtMs: createdAtMs, rowid: rowid, ), createCompanionCallback: ({ required String songId, required int createdAtMs, Value rowid = const Value.absent(), }) => FavoritesCompanion.insert( songId: songId, createdAtMs: createdAtMs, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => ( e.readTable(table), $$FavoritesTableReferences(db, table, e), ), ) .toList(), prefetchHooksCallback: ({songId = false}) { return PrefetchHooks( db: db, explicitlyWatchedTables: [], addJoins: < T extends TableManagerState< dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic > >(state) { if (songId) { state = state.withJoin( currentTable: table, currentColumn: table.songId, referencedTable: $$FavoritesTableReferences ._songIdTable(db), referencedColumn: $$FavoritesTableReferences ._songIdTable(db) .id, ) as T; } return state; }, getPrefetchedDataCallback: (items) async { return []; }, ); }, ), ); } typedef $$FavoritesTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $FavoritesTable, Favorite, $$FavoritesTableFilterComposer, $$FavoritesTableOrderingComposer, $$FavoritesTableAnnotationComposer, $$FavoritesTableCreateCompanionBuilder, $$FavoritesTableUpdateCompanionBuilder, (Favorite, $$FavoritesTableReferences), Favorite, PrefetchHooks Function({bool songId}) >; typedef $$PlaybackHistoryTableCreateCompanionBuilder = PlaybackHistoryCompanion Function({ required String songId, required int positionMs, required int playedAtMs, Value rowid, }); typedef $$PlaybackHistoryTableUpdateCompanionBuilder = PlaybackHistoryCompanion Function({ Value songId, Value positionMs, Value playedAtMs, Value rowid, }); final class $$PlaybackHistoryTableReferences extends BaseReferences<_$MeloDb, $PlaybackHistoryTable, PlaybackHistoryData> { $$PlaybackHistoryTableReferences( super.$_db, super.$_table, super.$_typedResult, ); static $SongsTable _songIdTable(_$MeloDb db) => db.songs.createAlias('playback_history__song_id__songs__id'); $$SongsTableProcessedTableManager get songId { final $_column = $_itemColumn('song_id')!; final manager = $$SongsTableTableManager( $_db, $_db.songs, ).filter((f) => f.id.sqlEquals($_column)); final item = $_typedResult.readTableOrNull(_songIdTable($_db)); if (item == null) return manager; return ProcessedTableManager( manager.$state.copyWith(prefetchedData: [item]), ); } } class $$PlaybackHistoryTableFilterComposer extends Composer<_$MeloDb, $PlaybackHistoryTable> { $$PlaybackHistoryTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get positionMs => $composableBuilder( column: $table.positionMs, builder: (column) => ColumnFilters(column), ); ColumnFilters get playedAtMs => $composableBuilder( column: $table.playedAtMs, builder: (column) => ColumnFilters(column), ); $$SongsTableFilterComposer get songId { final $$SongsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableFilterComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$PlaybackHistoryTableOrderingComposer extends Composer<_$MeloDb, $PlaybackHistoryTable> { $$PlaybackHistoryTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get positionMs => $composableBuilder( column: $table.positionMs, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get playedAtMs => $composableBuilder( column: $table.playedAtMs, builder: (column) => ColumnOrderings(column), ); $$SongsTableOrderingComposer get songId { final $$SongsTableOrderingComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableOrderingComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$PlaybackHistoryTableAnnotationComposer extends Composer<_$MeloDb, $PlaybackHistoryTable> { $$PlaybackHistoryTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get positionMs => $composableBuilder( column: $table.positionMs, builder: (column) => column, ); GeneratedColumn get playedAtMs => $composableBuilder( column: $table.playedAtMs, builder: (column) => column, ); $$SongsTableAnnotationComposer get songId { final $$SongsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableAnnotationComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$PlaybackHistoryTableTableManager extends RootTableManager< _$MeloDb, $PlaybackHistoryTable, PlaybackHistoryData, $$PlaybackHistoryTableFilterComposer, $$PlaybackHistoryTableOrderingComposer, $$PlaybackHistoryTableAnnotationComposer, $$PlaybackHistoryTableCreateCompanionBuilder, $$PlaybackHistoryTableUpdateCompanionBuilder, (PlaybackHistoryData, $$PlaybackHistoryTableReferences), PlaybackHistoryData, PrefetchHooks Function({bool songId}) > { $$PlaybackHistoryTableTableManager(_$MeloDb db, $PlaybackHistoryTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$PlaybackHistoryTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$PlaybackHistoryTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$PlaybackHistoryTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value songId = const Value.absent(), Value positionMs = const Value.absent(), Value playedAtMs = const Value.absent(), Value rowid = const Value.absent(), }) => PlaybackHistoryCompanion( songId: songId, positionMs: positionMs, playedAtMs: playedAtMs, rowid: rowid, ), createCompanionCallback: ({ required String songId, required int positionMs, required int playedAtMs, Value rowid = const Value.absent(), }) => PlaybackHistoryCompanion.insert( songId: songId, positionMs: positionMs, playedAtMs: playedAtMs, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => ( e.readTable(table), $$PlaybackHistoryTableReferences(db, table, e), ), ) .toList(), prefetchHooksCallback: ({songId = false}) { return PrefetchHooks( db: db, explicitlyWatchedTables: [], addJoins: < T extends TableManagerState< dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic > >(state) { if (songId) { state = state.withJoin( currentTable: table, currentColumn: table.songId, referencedTable: $$PlaybackHistoryTableReferences ._songIdTable(db), referencedColumn: $$PlaybackHistoryTableReferences ._songIdTable(db) .id, ) as T; } return state; }, getPrefetchedDataCallback: (items) async { return []; }, ); }, ), ); } typedef $$PlaybackHistoryTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $PlaybackHistoryTable, PlaybackHistoryData, $$PlaybackHistoryTableFilterComposer, $$PlaybackHistoryTableOrderingComposer, $$PlaybackHistoryTableAnnotationComposer, $$PlaybackHistoryTableCreateCompanionBuilder, $$PlaybackHistoryTableUpdateCompanionBuilder, (PlaybackHistoryData, $$PlaybackHistoryTableReferences), PlaybackHistoryData, PrefetchHooks Function({bool songId}) >; typedef $$SongCategoriesTableCreateCompanionBuilder = SongCategoriesCompanion Function({ required String songId, required String name, required int position, Value rowid, }); typedef $$SongCategoriesTableUpdateCompanionBuilder = SongCategoriesCompanion Function({ Value songId, Value name, Value position, Value rowid, }); final class $$SongCategoriesTableReferences extends BaseReferences<_$MeloDb, $SongCategoriesTable, SongCategory> { $$SongCategoriesTableReferences( super.$_db, super.$_table, super.$_typedResult, ); static $SongsTable _songIdTable(_$MeloDb db) => db.songs.createAlias('song_categories__song_id__songs__id'); $$SongsTableProcessedTableManager get songId { final $_column = $_itemColumn('song_id')!; final manager = $$SongsTableTableManager( $_db, $_db.songs, ).filter((f) => f.id.sqlEquals($_column)); final item = $_typedResult.readTableOrNull(_songIdTable($_db)); if (item == null) return manager; return ProcessedTableManager( manager.$state.copyWith(prefetchedData: [item]), ); } } class $$SongCategoriesTableFilterComposer extends Composer<_$MeloDb, $SongCategoriesTable> { $$SongCategoriesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get position => $composableBuilder( column: $table.position, builder: (column) => ColumnFilters(column), ); $$SongsTableFilterComposer get songId { final $$SongsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableFilterComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$SongCategoriesTableOrderingComposer extends Composer<_$MeloDb, $SongCategoriesTable> { $$SongCategoriesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get position => $composableBuilder( column: $table.position, builder: (column) => ColumnOrderings(column), ); $$SongsTableOrderingComposer get songId { final $$SongsTableOrderingComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableOrderingComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$SongCategoriesTableAnnotationComposer extends Composer<_$MeloDb, $SongCategoriesTable> { $$SongCategoriesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get position => $composableBuilder(column: $table.position, builder: (column) => column); $$SongsTableAnnotationComposer get songId { final $$SongsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.songId, referencedTable: $db.songs, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$SongsTableAnnotationComposer( $db: $db, $table: $db.songs, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$SongCategoriesTableTableManager extends RootTableManager< _$MeloDb, $SongCategoriesTable, SongCategory, $$SongCategoriesTableFilterComposer, $$SongCategoriesTableOrderingComposer, $$SongCategoriesTableAnnotationComposer, $$SongCategoriesTableCreateCompanionBuilder, $$SongCategoriesTableUpdateCompanionBuilder, (SongCategory, $$SongCategoriesTableReferences), SongCategory, PrefetchHooks Function({bool songId}) > { $$SongCategoriesTableTableManager(_$MeloDb db, $SongCategoriesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SongCategoriesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SongCategoriesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SongCategoriesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value songId = const Value.absent(), Value name = const Value.absent(), Value position = const Value.absent(), Value rowid = const Value.absent(), }) => SongCategoriesCompanion( songId: songId, name: name, position: position, rowid: rowid, ), createCompanionCallback: ({ required String songId, required String name, required int position, Value rowid = const Value.absent(), }) => SongCategoriesCompanion.insert( songId: songId, name: name, position: position, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => ( e.readTable(table), $$SongCategoriesTableReferences(db, table, e), ), ) .toList(), prefetchHooksCallback: ({songId = false}) { return PrefetchHooks( db: db, explicitlyWatchedTables: [], addJoins: < T extends TableManagerState< dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic > >(state) { if (songId) { state = state.withJoin( currentTable: table, currentColumn: table.songId, referencedTable: $$SongCategoriesTableReferences ._songIdTable(db), referencedColumn: $$SongCategoriesTableReferences ._songIdTable(db) .id, ) as T; } return state; }, getPrefetchedDataCallback: (items) async { return []; }, ); }, ), ); } typedef $$SongCategoriesTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $SongCategoriesTable, SongCategory, $$SongCategoriesTableFilterComposer, $$SongCategoriesTableOrderingComposer, $$SongCategoriesTableAnnotationComposer, $$SongCategoriesTableCreateCompanionBuilder, $$SongCategoriesTableUpdateCompanionBuilder, (SongCategory, $$SongCategoriesTableReferences), SongCategory, PrefetchHooks Function({bool songId}) >; typedef $$DownloadsTableCreateCompanionBuilder = DownloadsCompanion Function({ required String navidromeId, required String titel, Value kuenstler, Value album, required int groesseBytes, required int geladenAmMs, Value rowid, }); typedef $$DownloadsTableUpdateCompanionBuilder = DownloadsCompanion Function({ Value navidromeId, Value titel, Value kuenstler, Value album, Value groesseBytes, Value geladenAmMs, Value rowid, }); class $$DownloadsTableFilterComposer extends Composer<_$MeloDb, $DownloadsTable> { $$DownloadsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get navidromeId => $composableBuilder( column: $table.navidromeId, builder: (column) => ColumnFilters(column), ); ColumnFilters get titel => $composableBuilder( column: $table.titel, builder: (column) => ColumnFilters(column), ); ColumnFilters get kuenstler => $composableBuilder( column: $table.kuenstler, builder: (column) => ColumnFilters(column), ); ColumnFilters get album => $composableBuilder( column: $table.album, builder: (column) => ColumnFilters(column), ); ColumnFilters get groesseBytes => $composableBuilder( column: $table.groesseBytes, builder: (column) => ColumnFilters(column), ); ColumnFilters get geladenAmMs => $composableBuilder( column: $table.geladenAmMs, builder: (column) => ColumnFilters(column), ); } class $$DownloadsTableOrderingComposer extends Composer<_$MeloDb, $DownloadsTable> { $$DownloadsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get navidromeId => $composableBuilder( column: $table.navidromeId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get titel => $composableBuilder( column: $table.titel, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get kuenstler => $composableBuilder( column: $table.kuenstler, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get album => $composableBuilder( column: $table.album, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get groesseBytes => $composableBuilder( column: $table.groesseBytes, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get geladenAmMs => $composableBuilder( column: $table.geladenAmMs, builder: (column) => ColumnOrderings(column), ); } class $$DownloadsTableAnnotationComposer extends Composer<_$MeloDb, $DownloadsTable> { $$DownloadsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get navidromeId => $composableBuilder( column: $table.navidromeId, builder: (column) => column, ); GeneratedColumn get titel => $composableBuilder(column: $table.titel, builder: (column) => column); GeneratedColumn get kuenstler => $composableBuilder(column: $table.kuenstler, builder: (column) => column); GeneratedColumn get album => $composableBuilder(column: $table.album, builder: (column) => column); GeneratedColumn get groesseBytes => $composableBuilder( column: $table.groesseBytes, builder: (column) => column, ); GeneratedColumn get geladenAmMs => $composableBuilder( column: $table.geladenAmMs, builder: (column) => column, ); } class $$DownloadsTableTableManager extends RootTableManager< _$MeloDb, $DownloadsTable, Download, $$DownloadsTableFilterComposer, $$DownloadsTableOrderingComposer, $$DownloadsTableAnnotationComposer, $$DownloadsTableCreateCompanionBuilder, $$DownloadsTableUpdateCompanionBuilder, (Download, BaseReferences<_$MeloDb, $DownloadsTable, Download>), Download, PrefetchHooks Function() > { $$DownloadsTableTableManager(_$MeloDb db, $DownloadsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$DownloadsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$DownloadsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$DownloadsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value navidromeId = const Value.absent(), Value titel = const Value.absent(), Value kuenstler = const Value.absent(), Value album = const Value.absent(), Value groesseBytes = const Value.absent(), Value geladenAmMs = const Value.absent(), Value rowid = const Value.absent(), }) => DownloadsCompanion( navidromeId: navidromeId, titel: titel, kuenstler: kuenstler, album: album, groesseBytes: groesseBytes, geladenAmMs: geladenAmMs, rowid: rowid, ), createCompanionCallback: ({ required String navidromeId, required String titel, Value kuenstler = const Value.absent(), Value album = const Value.absent(), required int groesseBytes, required int geladenAmMs, Value rowid = const Value.absent(), }) => DownloadsCompanion.insert( navidromeId: navidromeId, titel: titel, kuenstler: kuenstler, album: album, groesseBytes: groesseBytes, geladenAmMs: geladenAmMs, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$DownloadsTableProcessedTableManager = ProcessedTableManager< _$MeloDb, $DownloadsTable, Download, $$DownloadsTableFilterComposer, $$DownloadsTableOrderingComposer, $$DownloadsTableAnnotationComposer, $$DownloadsTableCreateCompanionBuilder, $$DownloadsTableUpdateCompanionBuilder, (Download, BaseReferences<_$MeloDb, $DownloadsTable, Download>), Download, PrefetchHooks Function() >; class $MeloDbManager { final _$MeloDb _db; $MeloDbManager(this._db); $$SongsTableTableManager get songs => $$SongsTableTableManager(_db, _db.songs); $$FoldersTableTableManager get folders => $$FoldersTableTableManager(_db, _db.folders); $$PlaylistsTableTableManager get playlists => $$PlaylistsTableTableManager(_db, _db.playlists); $$PlaylistSongsTableTableManager get playlistSongs => $$PlaylistSongsTableTableManager(_db, _db.playlistSongs); $$FavoritesTableTableManager get favorites => $$FavoritesTableTableManager(_db, _db.favorites); $$PlaybackHistoryTableTableManager get playbackHistory => $$PlaybackHistoryTableTableManager(_db, _db.playbackHistory); $$SongCategoriesTableTableManager get songCategories => $$SongCategoriesTableTableManager(_db, _db.songCategories); $$DownloadsTableTableManager get downloads => $$DownloadsTableTableManager(_db, _db.downloads); }