// GENERATED CODE - DO NOT MODIFY BY HAND part of 'app_database.dart'; // ignore_for_file: type=lint class $DownloadedMediaTable extends DownloadedMedia with TableInfo<$DownloadedMediaTable, DownloadedMediaItem> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $DownloadedMediaTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _serverIdMeta = const VerificationMeta( 'serverId', ); @override late final GeneratedColumn serverId = GeneratedColumn( 'server_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _clientScopeIdMeta = const VerificationMeta( 'clientScopeId', ); @override late final GeneratedColumn clientScopeId = GeneratedColumn( 'client_scope_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _ratingKeyMeta = const VerificationMeta( 'ratingKey', ); @override late final GeneratedColumn ratingKey = GeneratedColumn( 'rating_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _globalKeyMeta = const VerificationMeta( 'globalKey', ); @override late final GeneratedColumn globalKey = GeneratedColumn( 'global_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'), ); static const VerificationMeta _typeMeta = const VerificationMeta('type'); @override late final GeneratedColumn type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _parentRatingKeyMeta = const VerificationMeta( 'parentRatingKey', ); @override late final GeneratedColumn parentRatingKey = GeneratedColumn( 'parent_rating_key', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _grandparentRatingKeyMeta = const VerificationMeta('grandparentRatingKey'); @override late final GeneratedColumn grandparentRatingKey = GeneratedColumn( 'grandparent_rating_key', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _statusMeta = const VerificationMeta('status'); @override late final GeneratedColumn status = GeneratedColumn( 'status', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _progressMeta = const VerificationMeta( 'progress', ); @override late final GeneratedColumn progress = GeneratedColumn( 'progress', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _totalBytesMeta = const VerificationMeta( 'totalBytes', ); @override late final GeneratedColumn totalBytes = GeneratedColumn( 'total_bytes', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _downloadedBytesMeta = const VerificationMeta( 'downloadedBytes', ); @override late final GeneratedColumn downloadedBytes = GeneratedColumn( 'downloaded_bytes', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _videoFilePathMeta = const VerificationMeta( 'videoFilePath', ); @override late final GeneratedColumn videoFilePath = GeneratedColumn( 'video_file_path', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _thumbPathMeta = const VerificationMeta( 'thumbPath', ); @override late final GeneratedColumn thumbPath = GeneratedColumn( 'thumb_path', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _downloadedAtMeta = const VerificationMeta( 'downloadedAt', ); @override late final GeneratedColumn downloadedAt = GeneratedColumn( 'downloaded_at', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _errorMessageMeta = const VerificationMeta( 'errorMessage', ); @override late final GeneratedColumn errorMessage = GeneratedColumn( 'error_message', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _retryCountMeta = const VerificationMeta( 'retryCount', ); @override late final GeneratedColumn retryCount = GeneratedColumn( 'retry_count', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _bgTaskIdMeta = const VerificationMeta( 'bgTaskId', ); @override late final GeneratedColumn bgTaskId = GeneratedColumn( 'bg_task_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _mediaIndexMeta = const VerificationMeta( 'mediaIndex', ); @override late final GeneratedColumn mediaIndex = GeneratedColumn( 'media_index', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _mediaSourceIdMeta = const VerificationMeta( 'mediaSourceId', ); @override late final GeneratedColumn mediaSourceId = GeneratedColumn( 'media_source_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, serverId, clientScopeId, ratingKey, globalKey, type, parentRatingKey, grandparentRatingKey, status, progress, totalBytes, downloadedBytes, videoFilePath, thumbPath, downloadedAt, errorMessage, retryCount, bgTaskId, mediaIndex, mediaSourceId, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'downloaded_media'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } if (data.containsKey('server_id')) { context.handle( _serverIdMeta, serverId.isAcceptableOrUnknown(data['server_id']!, _serverIdMeta), ); } else if (isInserting) { context.missing(_serverIdMeta); } if (data.containsKey('client_scope_id')) { context.handle( _clientScopeIdMeta, clientScopeId.isAcceptableOrUnknown( data['client_scope_id']!, _clientScopeIdMeta, ), ); } if (data.containsKey('rating_key')) { context.handle( _ratingKeyMeta, ratingKey.isAcceptableOrUnknown(data['rating_key']!, _ratingKeyMeta), ); } else if (isInserting) { context.missing(_ratingKeyMeta); } if (data.containsKey('global_key')) { context.handle( _globalKeyMeta, globalKey.isAcceptableOrUnknown(data['global_key']!, _globalKeyMeta), ); } else if (isInserting) { context.missing(_globalKeyMeta); } if (data.containsKey('type')) { context.handle( _typeMeta, type.isAcceptableOrUnknown(data['type']!, _typeMeta), ); } else if (isInserting) { context.missing(_typeMeta); } if (data.containsKey('parent_rating_key')) { context.handle( _parentRatingKeyMeta, parentRatingKey.isAcceptableOrUnknown( data['parent_rating_key']!, _parentRatingKeyMeta, ), ); } if (data.containsKey('grandparent_rating_key')) { context.handle( _grandparentRatingKeyMeta, grandparentRatingKey.isAcceptableOrUnknown( data['grandparent_rating_key']!, _grandparentRatingKeyMeta, ), ); } if (data.containsKey('status')) { context.handle( _statusMeta, status.isAcceptableOrUnknown(data['status']!, _statusMeta), ); } else if (isInserting) { context.missing(_statusMeta); } if (data.containsKey('progress')) { context.handle( _progressMeta, progress.isAcceptableOrUnknown(data['progress']!, _progressMeta), ); } if (data.containsKey('total_bytes')) { context.handle( _totalBytesMeta, totalBytes.isAcceptableOrUnknown(data['total_bytes']!, _totalBytesMeta), ); } if (data.containsKey('downloaded_bytes')) { context.handle( _downloadedBytesMeta, downloadedBytes.isAcceptableOrUnknown( data['downloaded_bytes']!, _downloadedBytesMeta, ), ); } if (data.containsKey('video_file_path')) { context.handle( _videoFilePathMeta, videoFilePath.isAcceptableOrUnknown( data['video_file_path']!, _videoFilePathMeta, ), ); } if (data.containsKey('thumb_path')) { context.handle( _thumbPathMeta, thumbPath.isAcceptableOrUnknown(data['thumb_path']!, _thumbPathMeta), ); } if (data.containsKey('downloaded_at')) { context.handle( _downloadedAtMeta, downloadedAt.isAcceptableOrUnknown( data['downloaded_at']!, _downloadedAtMeta, ), ); } if (data.containsKey('error_message')) { context.handle( _errorMessageMeta, errorMessage.isAcceptableOrUnknown( data['error_message']!, _errorMessageMeta, ), ); } if (data.containsKey('retry_count')) { context.handle( _retryCountMeta, retryCount.isAcceptableOrUnknown(data['retry_count']!, _retryCountMeta), ); } if (data.containsKey('bg_task_id')) { context.handle( _bgTaskIdMeta, bgTaskId.isAcceptableOrUnknown(data['bg_task_id']!, _bgTaskIdMeta), ); } if (data.containsKey('media_index')) { context.handle( _mediaIndexMeta, mediaIndex.isAcceptableOrUnknown(data['media_index']!, _mediaIndexMeta), ); } if (data.containsKey('media_source_id')) { context.handle( _mediaSourceIdMeta, mediaSourceId.isAcceptableOrUnknown( data['media_source_id']!, _mediaSourceIdMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override DownloadedMediaItem map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return DownloadedMediaItem( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, serverId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}server_id'], )!, clientScopeId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}client_scope_id'], ), ratingKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}rating_key'], )!, globalKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}global_key'], )!, type: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}type'], )!, parentRatingKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_rating_key'], ), grandparentRatingKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}grandparent_rating_key'], ), status: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}status'], )!, progress: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}progress'], )!, totalBytes: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}total_bytes'], ), downloadedBytes: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}downloaded_bytes'], )!, videoFilePath: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}video_file_path'], ), thumbPath: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}thumb_path'], ), downloadedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}downloaded_at'], ), errorMessage: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}error_message'], ), retryCount: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}retry_count'], )!, bgTaskId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}bg_task_id'], ), mediaIndex: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}media_index'], )!, mediaSourceId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}media_source_id'], ), ); } @override $DownloadedMediaTable createAlias(String alias) { return $DownloadedMediaTable(attachedDatabase, alias); } } class DownloadedMediaItem extends DataClass implements Insertable { final int id; final String serverId; final String? clientScopeId; final String ratingKey; final String globalKey; final String type; final String? parentRatingKey; final String? grandparentRatingKey; final int status; final int progress; final int? totalBytes; final int downloadedBytes; final String? videoFilePath; final String? thumbPath; final int? downloadedAt; final String? errorMessage; final int retryCount; final String? bgTaskId; final int mediaIndex; final String? mediaSourceId; const DownloadedMediaItem({ required this.id, required this.serverId, this.clientScopeId, required this.ratingKey, required this.globalKey, required this.type, this.parentRatingKey, this.grandparentRatingKey, required this.status, required this.progress, this.totalBytes, required this.downloadedBytes, this.videoFilePath, this.thumbPath, this.downloadedAt, this.errorMessage, required this.retryCount, this.bgTaskId, required this.mediaIndex, this.mediaSourceId, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['server_id'] = Variable(serverId); if (!nullToAbsent || clientScopeId != null) { map['client_scope_id'] = Variable(clientScopeId); } map['rating_key'] = Variable(ratingKey); map['global_key'] = Variable(globalKey); map['type'] = Variable(type); if (!nullToAbsent || parentRatingKey != null) { map['parent_rating_key'] = Variable(parentRatingKey); } if (!nullToAbsent || grandparentRatingKey != null) { map['grandparent_rating_key'] = Variable(grandparentRatingKey); } map['status'] = Variable(status); map['progress'] = Variable(progress); if (!nullToAbsent || totalBytes != null) { map['total_bytes'] = Variable(totalBytes); } map['downloaded_bytes'] = Variable(downloadedBytes); if (!nullToAbsent || videoFilePath != null) { map['video_file_path'] = Variable(videoFilePath); } if (!nullToAbsent || thumbPath != null) { map['thumb_path'] = Variable(thumbPath); } if (!nullToAbsent || downloadedAt != null) { map['downloaded_at'] = Variable(downloadedAt); } if (!nullToAbsent || errorMessage != null) { map['error_message'] = Variable(errorMessage); } map['retry_count'] = Variable(retryCount); if (!nullToAbsent || bgTaskId != null) { map['bg_task_id'] = Variable(bgTaskId); } map['media_index'] = Variable(mediaIndex); if (!nullToAbsent || mediaSourceId != null) { map['media_source_id'] = Variable(mediaSourceId); } return map; } DownloadedMediaCompanion toCompanion(bool nullToAbsent) { return DownloadedMediaCompanion( id: Value(id), serverId: Value(serverId), clientScopeId: clientScopeId == null && nullToAbsent ? const Value.absent() : Value(clientScopeId), ratingKey: Value(ratingKey), globalKey: Value(globalKey), type: Value(type), parentRatingKey: parentRatingKey == null && nullToAbsent ? const Value.absent() : Value(parentRatingKey), grandparentRatingKey: grandparentRatingKey == null && nullToAbsent ? const Value.absent() : Value(grandparentRatingKey), status: Value(status), progress: Value(progress), totalBytes: totalBytes == null && nullToAbsent ? const Value.absent() : Value(totalBytes), downloadedBytes: Value(downloadedBytes), videoFilePath: videoFilePath == null && nullToAbsent ? const Value.absent() : Value(videoFilePath), thumbPath: thumbPath == null && nullToAbsent ? const Value.absent() : Value(thumbPath), downloadedAt: downloadedAt == null && nullToAbsent ? const Value.absent() : Value(downloadedAt), errorMessage: errorMessage == null && nullToAbsent ? const Value.absent() : Value(errorMessage), retryCount: Value(retryCount), bgTaskId: bgTaskId == null && nullToAbsent ? const Value.absent() : Value(bgTaskId), mediaIndex: Value(mediaIndex), mediaSourceId: mediaSourceId == null && nullToAbsent ? const Value.absent() : Value(mediaSourceId), ); } factory DownloadedMediaItem.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return DownloadedMediaItem( id: serializer.fromJson(json['id']), serverId: serializer.fromJson(json['serverId']), clientScopeId: serializer.fromJson(json['clientScopeId']), ratingKey: serializer.fromJson(json['ratingKey']), globalKey: serializer.fromJson(json['globalKey']), type: serializer.fromJson(json['type']), parentRatingKey: serializer.fromJson(json['parentRatingKey']), grandparentRatingKey: serializer.fromJson( json['grandparentRatingKey'], ), status: serializer.fromJson(json['status']), progress: serializer.fromJson(json['progress']), totalBytes: serializer.fromJson(json['totalBytes']), downloadedBytes: serializer.fromJson(json['downloadedBytes']), videoFilePath: serializer.fromJson(json['videoFilePath']), thumbPath: serializer.fromJson(json['thumbPath']), downloadedAt: serializer.fromJson(json['downloadedAt']), errorMessage: serializer.fromJson(json['errorMessage']), retryCount: serializer.fromJson(json['retryCount']), bgTaskId: serializer.fromJson(json['bgTaskId']), mediaIndex: serializer.fromJson(json['mediaIndex']), mediaSourceId: serializer.fromJson(json['mediaSourceId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'serverId': serializer.toJson(serverId), 'clientScopeId': serializer.toJson(clientScopeId), 'ratingKey': serializer.toJson(ratingKey), 'globalKey': serializer.toJson(globalKey), 'type': serializer.toJson(type), 'parentRatingKey': serializer.toJson(parentRatingKey), 'grandparentRatingKey': serializer.toJson(grandparentRatingKey), 'status': serializer.toJson(status), 'progress': serializer.toJson(progress), 'totalBytes': serializer.toJson(totalBytes), 'downloadedBytes': serializer.toJson(downloadedBytes), 'videoFilePath': serializer.toJson(videoFilePath), 'thumbPath': serializer.toJson(thumbPath), 'downloadedAt': serializer.toJson(downloadedAt), 'errorMessage': serializer.toJson(errorMessage), 'retryCount': serializer.toJson(retryCount), 'bgTaskId': serializer.toJson(bgTaskId), 'mediaIndex': serializer.toJson(mediaIndex), 'mediaSourceId': serializer.toJson(mediaSourceId), }; } DownloadedMediaItem copyWith({ int? id, String? serverId, Value clientScopeId = const Value.absent(), String? ratingKey, String? globalKey, String? type, Value parentRatingKey = const Value.absent(), Value grandparentRatingKey = const Value.absent(), int? status, int? progress, Value totalBytes = const Value.absent(), int? downloadedBytes, Value videoFilePath = const Value.absent(), Value thumbPath = const Value.absent(), Value downloadedAt = const Value.absent(), Value errorMessage = const Value.absent(), int? retryCount, Value bgTaskId = const Value.absent(), int? mediaIndex, Value mediaSourceId = const Value.absent(), }) => DownloadedMediaItem( id: id ?? this.id, serverId: serverId ?? this.serverId, clientScopeId: clientScopeId.present ? clientScopeId.value : this.clientScopeId, ratingKey: ratingKey ?? this.ratingKey, globalKey: globalKey ?? this.globalKey, type: type ?? this.type, parentRatingKey: parentRatingKey.present ? parentRatingKey.value : this.parentRatingKey, grandparentRatingKey: grandparentRatingKey.present ? grandparentRatingKey.value : this.grandparentRatingKey, status: status ?? this.status, progress: progress ?? this.progress, totalBytes: totalBytes.present ? totalBytes.value : this.totalBytes, downloadedBytes: downloadedBytes ?? this.downloadedBytes, videoFilePath: videoFilePath.present ? videoFilePath.value : this.videoFilePath, thumbPath: thumbPath.present ? thumbPath.value : this.thumbPath, downloadedAt: downloadedAt.present ? downloadedAt.value : this.downloadedAt, errorMessage: errorMessage.present ? errorMessage.value : this.errorMessage, retryCount: retryCount ?? this.retryCount, bgTaskId: bgTaskId.present ? bgTaskId.value : this.bgTaskId, mediaIndex: mediaIndex ?? this.mediaIndex, mediaSourceId: mediaSourceId.present ? mediaSourceId.value : this.mediaSourceId, ); DownloadedMediaItem copyWithCompanion(DownloadedMediaCompanion data) { return DownloadedMediaItem( id: data.id.present ? data.id.value : this.id, serverId: data.serverId.present ? data.serverId.value : this.serverId, clientScopeId: data.clientScopeId.present ? data.clientScopeId.value : this.clientScopeId, ratingKey: data.ratingKey.present ? data.ratingKey.value : this.ratingKey, globalKey: data.globalKey.present ? data.globalKey.value : this.globalKey, type: data.type.present ? data.type.value : this.type, parentRatingKey: data.parentRatingKey.present ? data.parentRatingKey.value : this.parentRatingKey, grandparentRatingKey: data.grandparentRatingKey.present ? data.grandparentRatingKey.value : this.grandparentRatingKey, status: data.status.present ? data.status.value : this.status, progress: data.progress.present ? data.progress.value : this.progress, totalBytes: data.totalBytes.present ? data.totalBytes.value : this.totalBytes, downloadedBytes: data.downloadedBytes.present ? data.downloadedBytes.value : this.downloadedBytes, videoFilePath: data.videoFilePath.present ? data.videoFilePath.value : this.videoFilePath, thumbPath: data.thumbPath.present ? data.thumbPath.value : this.thumbPath, downloadedAt: data.downloadedAt.present ? data.downloadedAt.value : this.downloadedAt, errorMessage: data.errorMessage.present ? data.errorMessage.value : this.errorMessage, retryCount: data.retryCount.present ? data.retryCount.value : this.retryCount, bgTaskId: data.bgTaskId.present ? data.bgTaskId.value : this.bgTaskId, mediaIndex: data.mediaIndex.present ? data.mediaIndex.value : this.mediaIndex, mediaSourceId: data.mediaSourceId.present ? data.mediaSourceId.value : this.mediaSourceId, ); } @override String toString() { return (StringBuffer('DownloadedMediaItem(') ..write('id: $id, ') ..write('serverId: $serverId, ') ..write('clientScopeId: $clientScopeId, ') ..write('ratingKey: $ratingKey, ') ..write('globalKey: $globalKey, ') ..write('type: $type, ') ..write('parentRatingKey: $parentRatingKey, ') ..write('grandparentRatingKey: $grandparentRatingKey, ') ..write('status: $status, ') ..write('progress: $progress, ') ..write('totalBytes: $totalBytes, ') ..write('downloadedBytes: $downloadedBytes, ') ..write('videoFilePath: $videoFilePath, ') ..write('thumbPath: $thumbPath, ') ..write('downloadedAt: $downloadedAt, ') ..write('errorMessage: $errorMessage, ') ..write('retryCount: $retryCount, ') ..write('bgTaskId: $bgTaskId, ') ..write('mediaIndex: $mediaIndex, ') ..write('mediaSourceId: $mediaSourceId') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, serverId, clientScopeId, ratingKey, globalKey, type, parentRatingKey, grandparentRatingKey, status, progress, totalBytes, downloadedBytes, videoFilePath, thumbPath, downloadedAt, errorMessage, retryCount, bgTaskId, mediaIndex, mediaSourceId, ); @override bool operator ==(Object other) => identical(this, other) || (other is DownloadedMediaItem && other.id == this.id && other.serverId == this.serverId && other.clientScopeId == this.clientScopeId && other.ratingKey == this.ratingKey && other.globalKey == this.globalKey && other.type == this.type && other.parentRatingKey == this.parentRatingKey && other.grandparentRatingKey == this.grandparentRatingKey && other.status == this.status && other.progress == this.progress && other.totalBytes == this.totalBytes && other.downloadedBytes == this.downloadedBytes && other.videoFilePath == this.videoFilePath && other.thumbPath == this.thumbPath && other.downloadedAt == this.downloadedAt && other.errorMessage == this.errorMessage && other.retryCount == this.retryCount && other.bgTaskId == this.bgTaskId && other.mediaIndex == this.mediaIndex && other.mediaSourceId == this.mediaSourceId); } class DownloadedMediaCompanion extends UpdateCompanion { final Value id; final Value serverId; final Value clientScopeId; final Value ratingKey; final Value globalKey; final Value type; final Value parentRatingKey; final Value grandparentRatingKey; final Value status; final Value progress; final Value totalBytes; final Value downloadedBytes; final Value videoFilePath; final Value thumbPath; final Value downloadedAt; final Value errorMessage; final Value retryCount; final Value bgTaskId; final Value mediaIndex; final Value mediaSourceId; const DownloadedMediaCompanion({ this.id = const Value.absent(), this.serverId = const Value.absent(), this.clientScopeId = const Value.absent(), this.ratingKey = const Value.absent(), this.globalKey = const Value.absent(), this.type = const Value.absent(), this.parentRatingKey = const Value.absent(), this.grandparentRatingKey = const Value.absent(), this.status = const Value.absent(), this.progress = const Value.absent(), this.totalBytes = const Value.absent(), this.downloadedBytes = const Value.absent(), this.videoFilePath = const Value.absent(), this.thumbPath = const Value.absent(), this.downloadedAt = const Value.absent(), this.errorMessage = const Value.absent(), this.retryCount = const Value.absent(), this.bgTaskId = const Value.absent(), this.mediaIndex = const Value.absent(), this.mediaSourceId = const Value.absent(), }); DownloadedMediaCompanion.insert({ this.id = const Value.absent(), required String serverId, this.clientScopeId = const Value.absent(), required String ratingKey, required String globalKey, required String type, this.parentRatingKey = const Value.absent(), this.grandparentRatingKey = const Value.absent(), required int status, this.progress = const Value.absent(), this.totalBytes = const Value.absent(), this.downloadedBytes = const Value.absent(), this.videoFilePath = const Value.absent(), this.thumbPath = const Value.absent(), this.downloadedAt = const Value.absent(), this.errorMessage = const Value.absent(), this.retryCount = const Value.absent(), this.bgTaskId = const Value.absent(), this.mediaIndex = const Value.absent(), this.mediaSourceId = const Value.absent(), }) : serverId = Value(serverId), ratingKey = Value(ratingKey), globalKey = Value(globalKey), type = Value(type), status = Value(status); static Insertable custom({ Expression? id, Expression? serverId, Expression? clientScopeId, Expression? ratingKey, Expression? globalKey, Expression? type, Expression? parentRatingKey, Expression? grandparentRatingKey, Expression? status, Expression? progress, Expression? totalBytes, Expression? downloadedBytes, Expression? videoFilePath, Expression? thumbPath, Expression? downloadedAt, Expression? errorMessage, Expression? retryCount, Expression? bgTaskId, Expression? mediaIndex, Expression? mediaSourceId, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (serverId != null) 'server_id': serverId, if (clientScopeId != null) 'client_scope_id': clientScopeId, if (ratingKey != null) 'rating_key': ratingKey, if (globalKey != null) 'global_key': globalKey, if (type != null) 'type': type, if (parentRatingKey != null) 'parent_rating_key': parentRatingKey, if (grandparentRatingKey != null) 'grandparent_rating_key': grandparentRatingKey, if (status != null) 'status': status, if (progress != null) 'progress': progress, if (totalBytes != null) 'total_bytes': totalBytes, if (downloadedBytes != null) 'downloaded_bytes': downloadedBytes, if (videoFilePath != null) 'video_file_path': videoFilePath, if (thumbPath != null) 'thumb_path': thumbPath, if (downloadedAt != null) 'downloaded_at': downloadedAt, if (errorMessage != null) 'error_message': errorMessage, if (retryCount != null) 'retry_count': retryCount, if (bgTaskId != null) 'bg_task_id': bgTaskId, if (mediaIndex != null) 'media_index': mediaIndex, if (mediaSourceId != null) 'media_source_id': mediaSourceId, }); } DownloadedMediaCompanion copyWith({ Value? id, Value? serverId, Value? clientScopeId, Value? ratingKey, Value? globalKey, Value? type, Value? parentRatingKey, Value? grandparentRatingKey, Value? status, Value? progress, Value? totalBytes, Value? downloadedBytes, Value? videoFilePath, Value? thumbPath, Value? downloadedAt, Value? errorMessage, Value? retryCount, Value? bgTaskId, Value? mediaIndex, Value? mediaSourceId, }) { return DownloadedMediaCompanion( id: id ?? this.id, serverId: serverId ?? this.serverId, clientScopeId: clientScopeId ?? this.clientScopeId, ratingKey: ratingKey ?? this.ratingKey, globalKey: globalKey ?? this.globalKey, type: type ?? this.type, parentRatingKey: parentRatingKey ?? this.parentRatingKey, grandparentRatingKey: grandparentRatingKey ?? this.grandparentRatingKey, status: status ?? this.status, progress: progress ?? this.progress, totalBytes: totalBytes ?? this.totalBytes, downloadedBytes: downloadedBytes ?? this.downloadedBytes, videoFilePath: videoFilePath ?? this.videoFilePath, thumbPath: thumbPath ?? this.thumbPath, downloadedAt: downloadedAt ?? this.downloadedAt, errorMessage: errorMessage ?? this.errorMessage, retryCount: retryCount ?? this.retryCount, bgTaskId: bgTaskId ?? this.bgTaskId, mediaIndex: mediaIndex ?? this.mediaIndex, mediaSourceId: mediaSourceId ?? this.mediaSourceId, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (serverId.present) { map['server_id'] = Variable(serverId.value); } if (clientScopeId.present) { map['client_scope_id'] = Variable(clientScopeId.value); } if (ratingKey.present) { map['rating_key'] = Variable(ratingKey.value); } if (globalKey.present) { map['global_key'] = Variable(globalKey.value); } if (type.present) { map['type'] = Variable(type.value); } if (parentRatingKey.present) { map['parent_rating_key'] = Variable(parentRatingKey.value); } if (grandparentRatingKey.present) { map['grandparent_rating_key'] = Variable( grandparentRatingKey.value, ); } if (status.present) { map['status'] = Variable(status.value); } if (progress.present) { map['progress'] = Variable(progress.value); } if (totalBytes.present) { map['total_bytes'] = Variable(totalBytes.value); } if (downloadedBytes.present) { map['downloaded_bytes'] = Variable(downloadedBytes.value); } if (videoFilePath.present) { map['video_file_path'] = Variable(videoFilePath.value); } if (thumbPath.present) { map['thumb_path'] = Variable(thumbPath.value); } if (downloadedAt.present) { map['downloaded_at'] = Variable(downloadedAt.value); } if (errorMessage.present) { map['error_message'] = Variable(errorMessage.value); } if (retryCount.present) { map['retry_count'] = Variable(retryCount.value); } if (bgTaskId.present) { map['bg_task_id'] = Variable(bgTaskId.value); } if (mediaIndex.present) { map['media_index'] = Variable(mediaIndex.value); } if (mediaSourceId.present) { map['media_source_id'] = Variable(mediaSourceId.value); } return map; } @override String toString() { return (StringBuffer('DownloadedMediaCompanion(') ..write('id: $id, ') ..write('serverId: $serverId, ') ..write('clientScopeId: $clientScopeId, ') ..write('ratingKey: $ratingKey, ') ..write('globalKey: $globalKey, ') ..write('type: $type, ') ..write('parentRatingKey: $parentRatingKey, ') ..write('grandparentRatingKey: $grandparentRatingKey, ') ..write('status: $status, ') ..write('progress: $progress, ') ..write('totalBytes: $totalBytes, ') ..write('downloadedBytes: $downloadedBytes, ') ..write('videoFilePath: $videoFilePath, ') ..write('thumbPath: $thumbPath, ') ..write('downloadedAt: $downloadedAt, ') ..write('errorMessage: $errorMessage, ') ..write('retryCount: $retryCount, ') ..write('bgTaskId: $bgTaskId, ') ..write('mediaIndex: $mediaIndex, ') ..write('mediaSourceId: $mediaSourceId') ..write(')')) .toString(); } } class $DownloadOwnersTable extends DownloadOwners with TableInfo<$DownloadOwnersTable, DownloadOwnerItem> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $DownloadOwnersTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _profileIdMeta = const VerificationMeta( 'profileId', ); @override late final GeneratedColumn profileId = GeneratedColumn( 'profile_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _globalKeyMeta = const VerificationMeta( 'globalKey', ); @override late final GeneratedColumn globalKey = GeneratedColumn( 'global_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); @override List get $columns => [profileId, globalKey, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'download_owners'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('profile_id')) { context.handle( _profileIdMeta, profileId.isAcceptableOrUnknown(data['profile_id']!, _profileIdMeta), ); } else if (isInserting) { context.missing(_profileIdMeta); } if (data.containsKey('global_key')) { context.handle( _globalKeyMeta, globalKey.isAcceptableOrUnknown(data['global_key']!, _globalKeyMeta), ); } else if (isInserting) { context.missing(_globalKeyMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } return context; } @override Set get $primaryKey => {profileId, globalKey}; @override DownloadOwnerItem map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return DownloadOwnerItem( profileId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}profile_id'], )!, globalKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}global_key'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, ); } @override $DownloadOwnersTable createAlias(String alias) { return $DownloadOwnersTable(attachedDatabase, alias); } } class DownloadOwnerItem extends DataClass implements Insertable { final String profileId; final String globalKey; final int createdAt; const DownloadOwnerItem({ required this.profileId, required this.globalKey, required this.createdAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['profile_id'] = Variable(profileId); map['global_key'] = Variable(globalKey); map['created_at'] = Variable(createdAt); return map; } DownloadOwnersCompanion toCompanion(bool nullToAbsent) { return DownloadOwnersCompanion( profileId: Value(profileId), globalKey: Value(globalKey), createdAt: Value(createdAt), ); } factory DownloadOwnerItem.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return DownloadOwnerItem( profileId: serializer.fromJson(json['profileId']), globalKey: serializer.fromJson(json['globalKey']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'profileId': serializer.toJson(profileId), 'globalKey': serializer.toJson(globalKey), 'createdAt': serializer.toJson(createdAt), }; } DownloadOwnerItem copyWith({ String? profileId, String? globalKey, int? createdAt, }) => DownloadOwnerItem( profileId: profileId ?? this.profileId, globalKey: globalKey ?? this.globalKey, createdAt: createdAt ?? this.createdAt, ); DownloadOwnerItem copyWithCompanion(DownloadOwnersCompanion data) { return DownloadOwnerItem( profileId: data.profileId.present ? data.profileId.value : this.profileId, globalKey: data.globalKey.present ? data.globalKey.value : this.globalKey, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('DownloadOwnerItem(') ..write('profileId: $profileId, ') ..write('globalKey: $globalKey, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(profileId, globalKey, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is DownloadOwnerItem && other.profileId == this.profileId && other.globalKey == this.globalKey && other.createdAt == this.createdAt); } class DownloadOwnersCompanion extends UpdateCompanion { final Value profileId; final Value globalKey; final Value createdAt; final Value rowid; const DownloadOwnersCompanion({ this.profileId = const Value.absent(), this.globalKey = const Value.absent(), this.createdAt = const Value.absent(), this.rowid = const Value.absent(), }); DownloadOwnersCompanion.insert({ required String profileId, required String globalKey, required int createdAt, this.rowid = const Value.absent(), }) : profileId = Value(profileId), globalKey = Value(globalKey), createdAt = Value(createdAt); static Insertable custom({ Expression? profileId, Expression? globalKey, Expression? createdAt, Expression? rowid, }) { return RawValuesInsertable({ if (profileId != null) 'profile_id': profileId, if (globalKey != null) 'global_key': globalKey, if (createdAt != null) 'created_at': createdAt, if (rowid != null) 'rowid': rowid, }); } DownloadOwnersCompanion copyWith({ Value? profileId, Value? globalKey, Value? createdAt, Value? rowid, }) { return DownloadOwnersCompanion( profileId: profileId ?? this.profileId, globalKey: globalKey ?? this.globalKey, createdAt: createdAt ?? this.createdAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (profileId.present) { map['profile_id'] = Variable(profileId.value); } if (globalKey.present) { map['global_key'] = Variable(globalKey.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('DownloadOwnersCompanion(') ..write('profileId: $profileId, ') ..write('globalKey: $globalKey, ') ..write('createdAt: $createdAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $DownloadQueueTable extends DownloadQueue with TableInfo<$DownloadQueueTable, DownloadQueueItem> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $DownloadQueueTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _mediaGlobalKeyMeta = const VerificationMeta( 'mediaGlobalKey', ); @override late final GeneratedColumn mediaGlobalKey = GeneratedColumn( 'media_global_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'), ); static const VerificationMeta _priorityMeta = const VerificationMeta( 'priority', ); @override late final GeneratedColumn priority = GeneratedColumn( 'priority', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _addedAtMeta = const VerificationMeta( 'addedAt', ); @override late final GeneratedColumn addedAt = GeneratedColumn( 'added_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _downloadSubtitlesMeta = const VerificationMeta( 'downloadSubtitles', ); @override late final GeneratedColumn downloadSubtitles = GeneratedColumn( 'download_subtitles', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("download_subtitles" IN (0, 1))', ), defaultValue: const Constant(true), ); static const VerificationMeta _downloadArtworkMeta = const VerificationMeta( 'downloadArtwork', ); @override late final GeneratedColumn downloadArtwork = GeneratedColumn( 'download_artwork', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("download_artwork" IN (0, 1))', ), defaultValue: const Constant(true), ); @override List get $columns => [ id, mediaGlobalKey, priority, addedAt, downloadSubtitles, downloadArtwork, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'download_queue'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } if (data.containsKey('media_global_key')) { context.handle( _mediaGlobalKeyMeta, mediaGlobalKey.isAcceptableOrUnknown( data['media_global_key']!, _mediaGlobalKeyMeta, ), ); } else if (isInserting) { context.missing(_mediaGlobalKeyMeta); } if (data.containsKey('priority')) { context.handle( _priorityMeta, priority.isAcceptableOrUnknown(data['priority']!, _priorityMeta), ); } if (data.containsKey('added_at')) { context.handle( _addedAtMeta, addedAt.isAcceptableOrUnknown(data['added_at']!, _addedAtMeta), ); } else if (isInserting) { context.missing(_addedAtMeta); } if (data.containsKey('download_subtitles')) { context.handle( _downloadSubtitlesMeta, downloadSubtitles.isAcceptableOrUnknown( data['download_subtitles']!, _downloadSubtitlesMeta, ), ); } if (data.containsKey('download_artwork')) { context.handle( _downloadArtworkMeta, downloadArtwork.isAcceptableOrUnknown( data['download_artwork']!, _downloadArtworkMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override DownloadQueueItem map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return DownloadQueueItem( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, mediaGlobalKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}media_global_key'], )!, priority: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}priority'], )!, addedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}added_at'], )!, downloadSubtitles: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}download_subtitles'], )!, downloadArtwork: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}download_artwork'], )!, ); } @override $DownloadQueueTable createAlias(String alias) { return $DownloadQueueTable(attachedDatabase, alias); } } class DownloadQueueItem extends DataClass implements Insertable { final int id; final String mediaGlobalKey; final int priority; final int addedAt; final bool downloadSubtitles; final bool downloadArtwork; const DownloadQueueItem({ required this.id, required this.mediaGlobalKey, required this.priority, required this.addedAt, required this.downloadSubtitles, required this.downloadArtwork, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['media_global_key'] = Variable(mediaGlobalKey); map['priority'] = Variable(priority); map['added_at'] = Variable(addedAt); map['download_subtitles'] = Variable(downloadSubtitles); map['download_artwork'] = Variable(downloadArtwork); return map; } DownloadQueueCompanion toCompanion(bool nullToAbsent) { return DownloadQueueCompanion( id: Value(id), mediaGlobalKey: Value(mediaGlobalKey), priority: Value(priority), addedAt: Value(addedAt), downloadSubtitles: Value(downloadSubtitles), downloadArtwork: Value(downloadArtwork), ); } factory DownloadQueueItem.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return DownloadQueueItem( id: serializer.fromJson(json['id']), mediaGlobalKey: serializer.fromJson(json['mediaGlobalKey']), priority: serializer.fromJson(json['priority']), addedAt: serializer.fromJson(json['addedAt']), downloadSubtitles: serializer.fromJson(json['downloadSubtitles']), downloadArtwork: serializer.fromJson(json['downloadArtwork']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'mediaGlobalKey': serializer.toJson(mediaGlobalKey), 'priority': serializer.toJson(priority), 'addedAt': serializer.toJson(addedAt), 'downloadSubtitles': serializer.toJson(downloadSubtitles), 'downloadArtwork': serializer.toJson(downloadArtwork), }; } DownloadQueueItem copyWith({ int? id, String? mediaGlobalKey, int? priority, int? addedAt, bool? downloadSubtitles, bool? downloadArtwork, }) => DownloadQueueItem( id: id ?? this.id, mediaGlobalKey: mediaGlobalKey ?? this.mediaGlobalKey, priority: priority ?? this.priority, addedAt: addedAt ?? this.addedAt, downloadSubtitles: downloadSubtitles ?? this.downloadSubtitles, downloadArtwork: downloadArtwork ?? this.downloadArtwork, ); DownloadQueueItem copyWithCompanion(DownloadQueueCompanion data) { return DownloadQueueItem( id: data.id.present ? data.id.value : this.id, mediaGlobalKey: data.mediaGlobalKey.present ? data.mediaGlobalKey.value : this.mediaGlobalKey, priority: data.priority.present ? data.priority.value : this.priority, addedAt: data.addedAt.present ? data.addedAt.value : this.addedAt, downloadSubtitles: data.downloadSubtitles.present ? data.downloadSubtitles.value : this.downloadSubtitles, downloadArtwork: data.downloadArtwork.present ? data.downloadArtwork.value : this.downloadArtwork, ); } @override String toString() { return (StringBuffer('DownloadQueueItem(') ..write('id: $id, ') ..write('mediaGlobalKey: $mediaGlobalKey, ') ..write('priority: $priority, ') ..write('addedAt: $addedAt, ') ..write('downloadSubtitles: $downloadSubtitles, ') ..write('downloadArtwork: $downloadArtwork') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, mediaGlobalKey, priority, addedAt, downloadSubtitles, downloadArtwork, ); @override bool operator ==(Object other) => identical(this, other) || (other is DownloadQueueItem && other.id == this.id && other.mediaGlobalKey == this.mediaGlobalKey && other.priority == this.priority && other.addedAt == this.addedAt && other.downloadSubtitles == this.downloadSubtitles && other.downloadArtwork == this.downloadArtwork); } class DownloadQueueCompanion extends UpdateCompanion { final Value id; final Value mediaGlobalKey; final Value priority; final Value addedAt; final Value downloadSubtitles; final Value downloadArtwork; const DownloadQueueCompanion({ this.id = const Value.absent(), this.mediaGlobalKey = const Value.absent(), this.priority = const Value.absent(), this.addedAt = const Value.absent(), this.downloadSubtitles = const Value.absent(), this.downloadArtwork = const Value.absent(), }); DownloadQueueCompanion.insert({ this.id = const Value.absent(), required String mediaGlobalKey, this.priority = const Value.absent(), required int addedAt, this.downloadSubtitles = const Value.absent(), this.downloadArtwork = const Value.absent(), }) : mediaGlobalKey = Value(mediaGlobalKey), addedAt = Value(addedAt); static Insertable custom({ Expression? id, Expression? mediaGlobalKey, Expression? priority, Expression? addedAt, Expression? downloadSubtitles, Expression? downloadArtwork, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (mediaGlobalKey != null) 'media_global_key': mediaGlobalKey, if (priority != null) 'priority': priority, if (addedAt != null) 'added_at': addedAt, if (downloadSubtitles != null) 'download_subtitles': downloadSubtitles, if (downloadArtwork != null) 'download_artwork': downloadArtwork, }); } DownloadQueueCompanion copyWith({ Value? id, Value? mediaGlobalKey, Value? priority, Value? addedAt, Value? downloadSubtitles, Value? downloadArtwork, }) { return DownloadQueueCompanion( id: id ?? this.id, mediaGlobalKey: mediaGlobalKey ?? this.mediaGlobalKey, priority: priority ?? this.priority, addedAt: addedAt ?? this.addedAt, downloadSubtitles: downloadSubtitles ?? this.downloadSubtitles, downloadArtwork: downloadArtwork ?? this.downloadArtwork, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (mediaGlobalKey.present) { map['media_global_key'] = Variable(mediaGlobalKey.value); } if (priority.present) { map['priority'] = Variable(priority.value); } if (addedAt.present) { map['added_at'] = Variable(addedAt.value); } if (downloadSubtitles.present) { map['download_subtitles'] = Variable(downloadSubtitles.value); } if (downloadArtwork.present) { map['download_artwork'] = Variable(downloadArtwork.value); } return map; } @override String toString() { return (StringBuffer('DownloadQueueCompanion(') ..write('id: $id, ') ..write('mediaGlobalKey: $mediaGlobalKey, ') ..write('priority: $priority, ') ..write('addedAt: $addedAt, ') ..write('downloadSubtitles: $downloadSubtitles, ') ..write('downloadArtwork: $downloadArtwork') ..write(')')) .toString(); } } class $ApiCacheTable extends ApiCache with TableInfo<$ApiCacheTable, ApiCacheData> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ApiCacheTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _cacheKeyMeta = const VerificationMeta( 'cacheKey', ); @override late final GeneratedColumn cacheKey = GeneratedColumn( 'cache_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _dataMeta = const VerificationMeta('data'); @override late final GeneratedColumn data = GeneratedColumn( 'data', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _pinnedMeta = const VerificationMeta('pinned'); @override late final GeneratedColumn pinned = GeneratedColumn( 'pinned', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("pinned" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _cachedAtMeta = const VerificationMeta( 'cachedAt', ); @override late final GeneratedColumn cachedAt = GeneratedColumn( 'cached_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: currentDateAndTime, ); @override List get $columns => [cacheKey, data, pinned, cachedAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'api_cache'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('cache_key')) { context.handle( _cacheKeyMeta, cacheKey.isAcceptableOrUnknown(data['cache_key']!, _cacheKeyMeta), ); } else if (isInserting) { context.missing(_cacheKeyMeta); } if (data.containsKey('data')) { context.handle( _dataMeta, this.data.isAcceptableOrUnknown(data['data']!, _dataMeta), ); } else if (isInserting) { context.missing(_dataMeta); } if (data.containsKey('pinned')) { context.handle( _pinnedMeta, pinned.isAcceptableOrUnknown(data['pinned']!, _pinnedMeta), ); } if (data.containsKey('cached_at')) { context.handle( _cachedAtMeta, cachedAt.isAcceptableOrUnknown(data['cached_at']!, _cachedAtMeta), ); } return context; } @override Set get $primaryKey => {cacheKey}; @override ApiCacheData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ApiCacheData( cacheKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}cache_key'], )!, data: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}data'], )!, pinned: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}pinned'], )!, cachedAt: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}cached_at'], )!, ); } @override $ApiCacheTable createAlias(String alias) { return $ApiCacheTable(attachedDatabase, alias); } } class ApiCacheData extends DataClass implements Insertable { /// Composite key: serverId:endpoint (e.g., "abc123:/library/metadata/12345" /// for Plex, "abc123:/Users/.../Items/..." for Jellyfin) final String cacheKey; final String data; /// Whether this item is pinned for offline access final bool pinned; /// Timestamp for cache invalidation (optional future use) final DateTime cachedAt; const ApiCacheData({ required this.cacheKey, required this.data, required this.pinned, required this.cachedAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['cache_key'] = Variable(cacheKey); map['data'] = Variable(data); map['pinned'] = Variable(pinned); map['cached_at'] = Variable(cachedAt); return map; } ApiCacheCompanion toCompanion(bool nullToAbsent) { return ApiCacheCompanion( cacheKey: Value(cacheKey), data: Value(data), pinned: Value(pinned), cachedAt: Value(cachedAt), ); } factory ApiCacheData.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ApiCacheData( cacheKey: serializer.fromJson(json['cacheKey']), data: serializer.fromJson(json['data']), pinned: serializer.fromJson(json['pinned']), cachedAt: serializer.fromJson(json['cachedAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'cacheKey': serializer.toJson(cacheKey), 'data': serializer.toJson(data), 'pinned': serializer.toJson(pinned), 'cachedAt': serializer.toJson(cachedAt), }; } ApiCacheData copyWith({ String? cacheKey, String? data, bool? pinned, DateTime? cachedAt, }) => ApiCacheData( cacheKey: cacheKey ?? this.cacheKey, data: data ?? this.data, pinned: pinned ?? this.pinned, cachedAt: cachedAt ?? this.cachedAt, ); ApiCacheData copyWithCompanion(ApiCacheCompanion data) { return ApiCacheData( cacheKey: data.cacheKey.present ? data.cacheKey.value : this.cacheKey, data: data.data.present ? data.data.value : this.data, pinned: data.pinned.present ? data.pinned.value : this.pinned, cachedAt: data.cachedAt.present ? data.cachedAt.value : this.cachedAt, ); } @override String toString() { return (StringBuffer('ApiCacheData(') ..write('cacheKey: $cacheKey, ') ..write('data: $data, ') ..write('pinned: $pinned, ') ..write('cachedAt: $cachedAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(cacheKey, data, pinned, cachedAt); @override bool operator ==(Object other) => identical(this, other) || (other is ApiCacheData && other.cacheKey == this.cacheKey && other.data == this.data && other.pinned == this.pinned && other.cachedAt == this.cachedAt); } class ApiCacheCompanion extends UpdateCompanion { final Value cacheKey; final Value data; final Value pinned; final Value cachedAt; final Value rowid; const ApiCacheCompanion({ this.cacheKey = const Value.absent(), this.data = const Value.absent(), this.pinned = const Value.absent(), this.cachedAt = const Value.absent(), this.rowid = const Value.absent(), }); ApiCacheCompanion.insert({ required String cacheKey, required String data, this.pinned = const Value.absent(), this.cachedAt = const Value.absent(), this.rowid = const Value.absent(), }) : cacheKey = Value(cacheKey), data = Value(data); static Insertable custom({ Expression? cacheKey, Expression? data, Expression? pinned, Expression? cachedAt, Expression? rowid, }) { return RawValuesInsertable({ if (cacheKey != null) 'cache_key': cacheKey, if (data != null) 'data': data, if (pinned != null) 'pinned': pinned, if (cachedAt != null) 'cached_at': cachedAt, if (rowid != null) 'rowid': rowid, }); } ApiCacheCompanion copyWith({ Value? cacheKey, Value? data, Value? pinned, Value? cachedAt, Value? rowid, }) { return ApiCacheCompanion( cacheKey: cacheKey ?? this.cacheKey, data: data ?? this.data, pinned: pinned ?? this.pinned, cachedAt: cachedAt ?? this.cachedAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (cacheKey.present) { map['cache_key'] = Variable(cacheKey.value); } if (data.present) { map['data'] = Variable(data.value); } if (pinned.present) { map['pinned'] = Variable(pinned.value); } if (cachedAt.present) { map['cached_at'] = Variable(cachedAt.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ApiCacheCompanion(') ..write('cacheKey: $cacheKey, ') ..write('data: $data, ') ..write('pinned: $pinned, ') ..write('cachedAt: $cachedAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $OfflineWatchProgressTable extends OfflineWatchProgress with TableInfo<$OfflineWatchProgressTable, OfflineWatchProgressItem> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $OfflineWatchProgressTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _profileIdMeta = const VerificationMeta( 'profileId', ); @override late final GeneratedColumn profileId = GeneratedColumn( 'profile_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _serverIdMeta = const VerificationMeta( 'serverId', ); @override late final GeneratedColumn serverId = GeneratedColumn( 'server_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _clientScopeIdMeta = const VerificationMeta( 'clientScopeId', ); @override late final GeneratedColumn clientScopeId = GeneratedColumn( 'client_scope_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _ratingKeyMeta = const VerificationMeta( 'ratingKey', ); @override late final GeneratedColumn ratingKey = GeneratedColumn( 'rating_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _globalKeyMeta = const VerificationMeta( 'globalKey', ); @override late final GeneratedColumn globalKey = GeneratedColumn( 'global_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _actionTypeMeta = const VerificationMeta( 'actionType', ); @override late final GeneratedColumn actionType = GeneratedColumn( 'action_type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _viewOffsetMeta = const VerificationMeta( 'viewOffset', ); @override late final GeneratedColumn viewOffset = GeneratedColumn( 'view_offset', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _durationMeta = const VerificationMeta( 'duration', ); @override late final GeneratedColumn duration = GeneratedColumn( 'duration', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _shouldMarkWatchedMeta = const VerificationMeta( 'shouldMarkWatched', ); @override late final GeneratedColumn shouldMarkWatched = GeneratedColumn( 'should_mark_watched', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("should_mark_watched" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _syncAttemptsMeta = const VerificationMeta( 'syncAttempts', ); @override late final GeneratedColumn syncAttempts = GeneratedColumn( 'sync_attempts', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _lastErrorMeta = const VerificationMeta( 'lastError', ); @override late final GeneratedColumn lastError = GeneratedColumn( 'last_error', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, profileId, serverId, clientScopeId, ratingKey, globalKey, actionType, viewOffset, duration, shouldMarkWatched, createdAt, updatedAt, syncAttempts, lastError, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'offline_watch_progress'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } if (data.containsKey('profile_id')) { context.handle( _profileIdMeta, profileId.isAcceptableOrUnknown(data['profile_id']!, _profileIdMeta), ); } if (data.containsKey('server_id')) { context.handle( _serverIdMeta, serverId.isAcceptableOrUnknown(data['server_id']!, _serverIdMeta), ); } else if (isInserting) { context.missing(_serverIdMeta); } if (data.containsKey('client_scope_id')) { context.handle( _clientScopeIdMeta, clientScopeId.isAcceptableOrUnknown( data['client_scope_id']!, _clientScopeIdMeta, ), ); } if (data.containsKey('rating_key')) { context.handle( _ratingKeyMeta, ratingKey.isAcceptableOrUnknown(data['rating_key']!, _ratingKeyMeta), ); } else if (isInserting) { context.missing(_ratingKeyMeta); } if (data.containsKey('global_key')) { context.handle( _globalKeyMeta, globalKey.isAcceptableOrUnknown(data['global_key']!, _globalKeyMeta), ); } else if (isInserting) { context.missing(_globalKeyMeta); } if (data.containsKey('action_type')) { context.handle( _actionTypeMeta, actionType.isAcceptableOrUnknown(data['action_type']!, _actionTypeMeta), ); } else if (isInserting) { context.missing(_actionTypeMeta); } if (data.containsKey('view_offset')) { context.handle( _viewOffsetMeta, viewOffset.isAcceptableOrUnknown(data['view_offset']!, _viewOffsetMeta), ); } if (data.containsKey('duration')) { context.handle( _durationMeta, duration.isAcceptableOrUnknown(data['duration']!, _durationMeta), ); } if (data.containsKey('should_mark_watched')) { context.handle( _shouldMarkWatchedMeta, shouldMarkWatched.isAcceptableOrUnknown( data['should_mark_watched']!, _shouldMarkWatchedMeta, ), ); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('sync_attempts')) { context.handle( _syncAttemptsMeta, syncAttempts.isAcceptableOrUnknown( data['sync_attempts']!, _syncAttemptsMeta, ), ); } if (data.containsKey('last_error')) { context.handle( _lastErrorMeta, lastError.isAcceptableOrUnknown(data['last_error']!, _lastErrorMeta), ); } return context; } @override Set get $primaryKey => {id}; @override OfflineWatchProgressItem map( Map data, { String? tablePrefix, }) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return OfflineWatchProgressItem( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, profileId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}profile_id'], ), serverId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}server_id'], )!, clientScopeId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}client_scope_id'], ), ratingKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}rating_key'], )!, globalKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}global_key'], )!, actionType: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}action_type'], )!, viewOffset: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}view_offset'], ), duration: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}duration'], ), shouldMarkWatched: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}should_mark_watched'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}updated_at'], )!, syncAttempts: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sync_attempts'], )!, lastError: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_error'], ), ); } @override $OfflineWatchProgressTable createAlias(String alias) { return $OfflineWatchProgressTable(attachedDatabase, alias); } } class OfflineWatchProgressItem extends DataClass implements Insertable { /// Auto-incrementing primary key final int id; /// Active Plezy profile that owns this queued action. final String? profileId; /// Server ID this media belongs to final String serverId; /// Optional user-scoped client/cache id for backends where [serverId] is /// shared by multiple users on the same server. final String? clientScopeId; /// Rating key of the media item final String ratingKey; /// Global key (serverId:ratingKey) for easy lookup final String globalKey; /// Type of action: 'progress', 'watched', 'unwatched' final String actionType; /// Current playback position in milliseconds (for 'progress' actions) final int? viewOffset; /// Duration of the media in milliseconds (for calculating percentage) final int? duration; /// Whether this item should be marked as watched (for progress sync) /// Auto-set to true when viewOffset >= 90% of duration final bool shouldMarkWatched; /// Timestamp when this action was recorded (milliseconds since epoch) final int createdAt; /// Timestamp when this action was last updated (for merging progress updates) final int updatedAt; /// Number of sync attempts (for retry logic) final int syncAttempts; /// Last sync error message final String? lastError; const OfflineWatchProgressItem({ required this.id, this.profileId, required this.serverId, this.clientScopeId, required this.ratingKey, required this.globalKey, required this.actionType, this.viewOffset, this.duration, required this.shouldMarkWatched, required this.createdAt, required this.updatedAt, required this.syncAttempts, this.lastError, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); if (!nullToAbsent || profileId != null) { map['profile_id'] = Variable(profileId); } map['server_id'] = Variable(serverId); if (!nullToAbsent || clientScopeId != null) { map['client_scope_id'] = Variable(clientScopeId); } map['rating_key'] = Variable(ratingKey); map['global_key'] = Variable(globalKey); map['action_type'] = Variable(actionType); if (!nullToAbsent || viewOffset != null) { map['view_offset'] = Variable(viewOffset); } if (!nullToAbsent || duration != null) { map['duration'] = Variable(duration); } map['should_mark_watched'] = Variable(shouldMarkWatched); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['sync_attempts'] = Variable(syncAttempts); if (!nullToAbsent || lastError != null) { map['last_error'] = Variable(lastError); } return map; } OfflineWatchProgressCompanion toCompanion(bool nullToAbsent) { return OfflineWatchProgressCompanion( id: Value(id), profileId: profileId == null && nullToAbsent ? const Value.absent() : Value(profileId), serverId: Value(serverId), clientScopeId: clientScopeId == null && nullToAbsent ? const Value.absent() : Value(clientScopeId), ratingKey: Value(ratingKey), globalKey: Value(globalKey), actionType: Value(actionType), viewOffset: viewOffset == null && nullToAbsent ? const Value.absent() : Value(viewOffset), duration: duration == null && nullToAbsent ? const Value.absent() : Value(duration), shouldMarkWatched: Value(shouldMarkWatched), createdAt: Value(createdAt), updatedAt: Value(updatedAt), syncAttempts: Value(syncAttempts), lastError: lastError == null && nullToAbsent ? const Value.absent() : Value(lastError), ); } factory OfflineWatchProgressItem.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return OfflineWatchProgressItem( id: serializer.fromJson(json['id']), profileId: serializer.fromJson(json['profileId']), serverId: serializer.fromJson(json['serverId']), clientScopeId: serializer.fromJson(json['clientScopeId']), ratingKey: serializer.fromJson(json['ratingKey']), globalKey: serializer.fromJson(json['globalKey']), actionType: serializer.fromJson(json['actionType']), viewOffset: serializer.fromJson(json['viewOffset']), duration: serializer.fromJson(json['duration']), shouldMarkWatched: serializer.fromJson(json['shouldMarkWatched']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), syncAttempts: serializer.fromJson(json['syncAttempts']), lastError: serializer.fromJson(json['lastError']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'profileId': serializer.toJson(profileId), 'serverId': serializer.toJson(serverId), 'clientScopeId': serializer.toJson(clientScopeId), 'ratingKey': serializer.toJson(ratingKey), 'globalKey': serializer.toJson(globalKey), 'actionType': serializer.toJson(actionType), 'viewOffset': serializer.toJson(viewOffset), 'duration': serializer.toJson(duration), 'shouldMarkWatched': serializer.toJson(shouldMarkWatched), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'syncAttempts': serializer.toJson(syncAttempts), 'lastError': serializer.toJson(lastError), }; } OfflineWatchProgressItem copyWith({ int? id, Value profileId = const Value.absent(), String? serverId, Value clientScopeId = const Value.absent(), String? ratingKey, String? globalKey, String? actionType, Value viewOffset = const Value.absent(), Value duration = const Value.absent(), bool? shouldMarkWatched, int? createdAt, int? updatedAt, int? syncAttempts, Value lastError = const Value.absent(), }) => OfflineWatchProgressItem( id: id ?? this.id, profileId: profileId.present ? profileId.value : this.profileId, serverId: serverId ?? this.serverId, clientScopeId: clientScopeId.present ? clientScopeId.value : this.clientScopeId, ratingKey: ratingKey ?? this.ratingKey, globalKey: globalKey ?? this.globalKey, actionType: actionType ?? this.actionType, viewOffset: viewOffset.present ? viewOffset.value : this.viewOffset, duration: duration.present ? duration.value : this.duration, shouldMarkWatched: shouldMarkWatched ?? this.shouldMarkWatched, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, syncAttempts: syncAttempts ?? this.syncAttempts, lastError: lastError.present ? lastError.value : this.lastError, ); OfflineWatchProgressItem copyWithCompanion( OfflineWatchProgressCompanion data, ) { return OfflineWatchProgressItem( id: data.id.present ? data.id.value : this.id, profileId: data.profileId.present ? data.profileId.value : this.profileId, serverId: data.serverId.present ? data.serverId.value : this.serverId, clientScopeId: data.clientScopeId.present ? data.clientScopeId.value : this.clientScopeId, ratingKey: data.ratingKey.present ? data.ratingKey.value : this.ratingKey, globalKey: data.globalKey.present ? data.globalKey.value : this.globalKey, actionType: data.actionType.present ? data.actionType.value : this.actionType, viewOffset: data.viewOffset.present ? data.viewOffset.value : this.viewOffset, duration: data.duration.present ? data.duration.value : this.duration, shouldMarkWatched: data.shouldMarkWatched.present ? data.shouldMarkWatched.value : this.shouldMarkWatched, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, syncAttempts: data.syncAttempts.present ? data.syncAttempts.value : this.syncAttempts, lastError: data.lastError.present ? data.lastError.value : this.lastError, ); } @override String toString() { return (StringBuffer('OfflineWatchProgressItem(') ..write('id: $id, ') ..write('profileId: $profileId, ') ..write('serverId: $serverId, ') ..write('clientScopeId: $clientScopeId, ') ..write('ratingKey: $ratingKey, ') ..write('globalKey: $globalKey, ') ..write('actionType: $actionType, ') ..write('viewOffset: $viewOffset, ') ..write('duration: $duration, ') ..write('shouldMarkWatched: $shouldMarkWatched, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('syncAttempts: $syncAttempts, ') ..write('lastError: $lastError') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, profileId, serverId, clientScopeId, ratingKey, globalKey, actionType, viewOffset, duration, shouldMarkWatched, createdAt, updatedAt, syncAttempts, lastError, ); @override bool operator ==(Object other) => identical(this, other) || (other is OfflineWatchProgressItem && other.id == this.id && other.profileId == this.profileId && other.serverId == this.serverId && other.clientScopeId == this.clientScopeId && other.ratingKey == this.ratingKey && other.globalKey == this.globalKey && other.actionType == this.actionType && other.viewOffset == this.viewOffset && other.duration == this.duration && other.shouldMarkWatched == this.shouldMarkWatched && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.syncAttempts == this.syncAttempts && other.lastError == this.lastError); } class OfflineWatchProgressCompanion extends UpdateCompanion { final Value id; final Value profileId; final Value serverId; final Value clientScopeId; final Value ratingKey; final Value globalKey; final Value actionType; final Value viewOffset; final Value duration; final Value shouldMarkWatched; final Value createdAt; final Value updatedAt; final Value syncAttempts; final Value lastError; const OfflineWatchProgressCompanion({ this.id = const Value.absent(), this.profileId = const Value.absent(), this.serverId = const Value.absent(), this.clientScopeId = const Value.absent(), this.ratingKey = const Value.absent(), this.globalKey = const Value.absent(), this.actionType = const Value.absent(), this.viewOffset = const Value.absent(), this.duration = const Value.absent(), this.shouldMarkWatched = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.syncAttempts = const Value.absent(), this.lastError = const Value.absent(), }); OfflineWatchProgressCompanion.insert({ this.id = const Value.absent(), this.profileId = const Value.absent(), required String serverId, this.clientScopeId = const Value.absent(), required String ratingKey, required String globalKey, required String actionType, this.viewOffset = const Value.absent(), this.duration = const Value.absent(), this.shouldMarkWatched = const Value.absent(), required int createdAt, required int updatedAt, this.syncAttempts = const Value.absent(), this.lastError = const Value.absent(), }) : serverId = Value(serverId), ratingKey = Value(ratingKey), globalKey = Value(globalKey), actionType = Value(actionType), createdAt = Value(createdAt), updatedAt = Value(updatedAt); static Insertable custom({ Expression? id, Expression? profileId, Expression? serverId, Expression? clientScopeId, Expression? ratingKey, Expression? globalKey, Expression? actionType, Expression? viewOffset, Expression? duration, Expression? shouldMarkWatched, Expression? createdAt, Expression? updatedAt, Expression? syncAttempts, Expression? lastError, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (profileId != null) 'profile_id': profileId, if (serverId != null) 'server_id': serverId, if (clientScopeId != null) 'client_scope_id': clientScopeId, if (ratingKey != null) 'rating_key': ratingKey, if (globalKey != null) 'global_key': globalKey, if (actionType != null) 'action_type': actionType, if (viewOffset != null) 'view_offset': viewOffset, if (duration != null) 'duration': duration, if (shouldMarkWatched != null) 'should_mark_watched': shouldMarkWatched, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (syncAttempts != null) 'sync_attempts': syncAttempts, if (lastError != null) 'last_error': lastError, }); } OfflineWatchProgressCompanion copyWith({ Value? id, Value? profileId, Value? serverId, Value? clientScopeId, Value? ratingKey, Value? globalKey, Value? actionType, Value? viewOffset, Value? duration, Value? shouldMarkWatched, Value? createdAt, Value? updatedAt, Value? syncAttempts, Value? lastError, }) { return OfflineWatchProgressCompanion( id: id ?? this.id, profileId: profileId ?? this.profileId, serverId: serverId ?? this.serverId, clientScopeId: clientScopeId ?? this.clientScopeId, ratingKey: ratingKey ?? this.ratingKey, globalKey: globalKey ?? this.globalKey, actionType: actionType ?? this.actionType, viewOffset: viewOffset ?? this.viewOffset, duration: duration ?? this.duration, shouldMarkWatched: shouldMarkWatched ?? this.shouldMarkWatched, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, syncAttempts: syncAttempts ?? this.syncAttempts, lastError: lastError ?? this.lastError, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (profileId.present) { map['profile_id'] = Variable(profileId.value); } if (serverId.present) { map['server_id'] = Variable(serverId.value); } if (clientScopeId.present) { map['client_scope_id'] = Variable(clientScopeId.value); } if (ratingKey.present) { map['rating_key'] = Variable(ratingKey.value); } if (globalKey.present) { map['global_key'] = Variable(globalKey.value); } if (actionType.present) { map['action_type'] = Variable(actionType.value); } if (viewOffset.present) { map['view_offset'] = Variable(viewOffset.value); } if (duration.present) { map['duration'] = Variable(duration.value); } if (shouldMarkWatched.present) { map['should_mark_watched'] = Variable(shouldMarkWatched.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (syncAttempts.present) { map['sync_attempts'] = Variable(syncAttempts.value); } if (lastError.present) { map['last_error'] = Variable(lastError.value); } return map; } @override String toString() { return (StringBuffer('OfflineWatchProgressCompanion(') ..write('id: $id, ') ..write('profileId: $profileId, ') ..write('serverId: $serverId, ') ..write('clientScopeId: $clientScopeId, ') ..write('ratingKey: $ratingKey, ') ..write('globalKey: $globalKey, ') ..write('actionType: $actionType, ') ..write('viewOffset: $viewOffset, ') ..write('duration: $duration, ') ..write('shouldMarkWatched: $shouldMarkWatched, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('syncAttempts: $syncAttempts, ') ..write('lastError: $lastError') ..write(')')) .toString(); } } class $SyncRulesTable extends SyncRules with TableInfo<$SyncRulesTable, SyncRuleItem> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SyncRulesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _profileIdMeta = const VerificationMeta( 'profileId', ); @override late final GeneratedColumn profileId = GeneratedColumn( 'profile_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant(''), ); static const VerificationMeta _serverIdMeta = const VerificationMeta( 'serverId', ); @override late final GeneratedColumn serverId = GeneratedColumn( 'server_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _ratingKeyMeta = const VerificationMeta( 'ratingKey', ); @override late final GeneratedColumn ratingKey = GeneratedColumn( 'rating_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _globalKeyMeta = const VerificationMeta( 'globalKey', ); @override late final GeneratedColumn globalKey = GeneratedColumn( 'global_key', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'), ); static const VerificationMeta _targetTypeMeta = const VerificationMeta( 'targetType', ); @override late final GeneratedColumn targetType = GeneratedColumn( 'target_type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _episodeCountMeta = const VerificationMeta( 'episodeCount', ); @override late final GeneratedColumn episodeCount = GeneratedColumn( 'episode_count', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _enabledMeta = const VerificationMeta( 'enabled', ); @override late final GeneratedColumn enabled = GeneratedColumn( 'enabled', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("enabled" IN (0, 1))', ), defaultValue: const Constant(true), ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _lastExecutedAtMeta = const VerificationMeta( 'lastExecutedAt', ); @override late final GeneratedColumn lastExecutedAt = GeneratedColumn( 'last_executed_at', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _mediaIndexMeta = const VerificationMeta( 'mediaIndex', ); @override late final GeneratedColumn mediaIndex = GeneratedColumn( 'media_index', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _downloadFilterMeta = const VerificationMeta( 'downloadFilter', ); @override late final GeneratedColumn downloadFilter = GeneratedColumn( 'download_filter', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('unwatched'), ); @override List get $columns => [ id, profileId, serverId, ratingKey, globalKey, targetType, episodeCount, enabled, createdAt, lastExecutedAt, mediaIndex, downloadFilter, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'sync_rules'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } if (data.containsKey('profile_id')) { context.handle( _profileIdMeta, profileId.isAcceptableOrUnknown(data['profile_id']!, _profileIdMeta), ); } if (data.containsKey('server_id')) { context.handle( _serverIdMeta, serverId.isAcceptableOrUnknown(data['server_id']!, _serverIdMeta), ); } else if (isInserting) { context.missing(_serverIdMeta); } if (data.containsKey('rating_key')) { context.handle( _ratingKeyMeta, ratingKey.isAcceptableOrUnknown(data['rating_key']!, _ratingKeyMeta), ); } else if (isInserting) { context.missing(_ratingKeyMeta); } if (data.containsKey('global_key')) { context.handle( _globalKeyMeta, globalKey.isAcceptableOrUnknown(data['global_key']!, _globalKeyMeta), ); } else if (isInserting) { context.missing(_globalKeyMeta); } if (data.containsKey('target_type')) { context.handle( _targetTypeMeta, targetType.isAcceptableOrUnknown(data['target_type']!, _targetTypeMeta), ); } else if (isInserting) { context.missing(_targetTypeMeta); } if (data.containsKey('episode_count')) { context.handle( _episodeCountMeta, episodeCount.isAcceptableOrUnknown( data['episode_count']!, _episodeCountMeta, ), ); } else if (isInserting) { context.missing(_episodeCountMeta); } if (data.containsKey('enabled')) { context.handle( _enabledMeta, enabled.isAcceptableOrUnknown(data['enabled']!, _enabledMeta), ); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('last_executed_at')) { context.handle( _lastExecutedAtMeta, lastExecutedAt.isAcceptableOrUnknown( data['last_executed_at']!, _lastExecutedAtMeta, ), ); } if (data.containsKey('media_index')) { context.handle( _mediaIndexMeta, mediaIndex.isAcceptableOrUnknown(data['media_index']!, _mediaIndexMeta), ); } if (data.containsKey('download_filter')) { context.handle( _downloadFilterMeta, downloadFilter.isAcceptableOrUnknown( data['download_filter']!, _downloadFilterMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override SyncRuleItem map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SyncRuleItem( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, profileId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}profile_id'], )!, serverId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}server_id'], )!, ratingKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}rating_key'], )!, globalKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}global_key'], )!, targetType: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}target_type'], )!, episodeCount: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}episode_count'], )!, enabled: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}enabled'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, lastExecutedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}last_executed_at'], ), mediaIndex: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}media_index'], )!, downloadFilter: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}download_filter'], )!, ); } @override $SyncRulesTable createAlias(String alias) { return $SyncRulesTable(attachedDatabase, alias); } } class SyncRuleItem extends DataClass implements Insertable { final int id; final String profileId; final String serverId; final String ratingKey; final String globalKey; final String targetType; final int episodeCount; final bool enabled; final int createdAt; final int? lastExecutedAt; final int mediaIndex; final String downloadFilter; const SyncRuleItem({ required this.id, required this.profileId, required this.serverId, required this.ratingKey, required this.globalKey, required this.targetType, required this.episodeCount, required this.enabled, required this.createdAt, this.lastExecutedAt, required this.mediaIndex, required this.downloadFilter, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['profile_id'] = Variable(profileId); map['server_id'] = Variable(serverId); map['rating_key'] = Variable(ratingKey); map['global_key'] = Variable(globalKey); map['target_type'] = Variable(targetType); map['episode_count'] = Variable(episodeCount); map['enabled'] = Variable(enabled); map['created_at'] = Variable(createdAt); if (!nullToAbsent || lastExecutedAt != null) { map['last_executed_at'] = Variable(lastExecutedAt); } map['media_index'] = Variable(mediaIndex); map['download_filter'] = Variable(downloadFilter); return map; } SyncRulesCompanion toCompanion(bool nullToAbsent) { return SyncRulesCompanion( id: Value(id), profileId: Value(profileId), serverId: Value(serverId), ratingKey: Value(ratingKey), globalKey: Value(globalKey), targetType: Value(targetType), episodeCount: Value(episodeCount), enabled: Value(enabled), createdAt: Value(createdAt), lastExecutedAt: lastExecutedAt == null && nullToAbsent ? const Value.absent() : Value(lastExecutedAt), mediaIndex: Value(mediaIndex), downloadFilter: Value(downloadFilter), ); } factory SyncRuleItem.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return SyncRuleItem( id: serializer.fromJson(json['id']), profileId: serializer.fromJson(json['profileId']), serverId: serializer.fromJson(json['serverId']), ratingKey: serializer.fromJson(json['ratingKey']), globalKey: serializer.fromJson(json['globalKey']), targetType: serializer.fromJson(json['targetType']), episodeCount: serializer.fromJson(json['episodeCount']), enabled: serializer.fromJson(json['enabled']), createdAt: serializer.fromJson(json['createdAt']), lastExecutedAt: serializer.fromJson(json['lastExecutedAt']), mediaIndex: serializer.fromJson(json['mediaIndex']), downloadFilter: serializer.fromJson(json['downloadFilter']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'profileId': serializer.toJson(profileId), 'serverId': serializer.toJson(serverId), 'ratingKey': serializer.toJson(ratingKey), 'globalKey': serializer.toJson(globalKey), 'targetType': serializer.toJson(targetType), 'episodeCount': serializer.toJson(episodeCount), 'enabled': serializer.toJson(enabled), 'createdAt': serializer.toJson(createdAt), 'lastExecutedAt': serializer.toJson(lastExecutedAt), 'mediaIndex': serializer.toJson(mediaIndex), 'downloadFilter': serializer.toJson(downloadFilter), }; } SyncRuleItem copyWith({ int? id, String? profileId, String? serverId, String? ratingKey, String? globalKey, String? targetType, int? episodeCount, bool? enabled, int? createdAt, Value lastExecutedAt = const Value.absent(), int? mediaIndex, String? downloadFilter, }) => SyncRuleItem( id: id ?? this.id, profileId: profileId ?? this.profileId, serverId: serverId ?? this.serverId, ratingKey: ratingKey ?? this.ratingKey, globalKey: globalKey ?? this.globalKey, targetType: targetType ?? this.targetType, episodeCount: episodeCount ?? this.episodeCount, enabled: enabled ?? this.enabled, createdAt: createdAt ?? this.createdAt, lastExecutedAt: lastExecutedAt.present ? lastExecutedAt.value : this.lastExecutedAt, mediaIndex: mediaIndex ?? this.mediaIndex, downloadFilter: downloadFilter ?? this.downloadFilter, ); SyncRuleItem copyWithCompanion(SyncRulesCompanion data) { return SyncRuleItem( id: data.id.present ? data.id.value : this.id, profileId: data.profileId.present ? data.profileId.value : this.profileId, serverId: data.serverId.present ? data.serverId.value : this.serverId, ratingKey: data.ratingKey.present ? data.ratingKey.value : this.ratingKey, globalKey: data.globalKey.present ? data.globalKey.value : this.globalKey, targetType: data.targetType.present ? data.targetType.value : this.targetType, episodeCount: data.episodeCount.present ? data.episodeCount.value : this.episodeCount, enabled: data.enabled.present ? data.enabled.value : this.enabled, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, lastExecutedAt: data.lastExecutedAt.present ? data.lastExecutedAt.value : this.lastExecutedAt, mediaIndex: data.mediaIndex.present ? data.mediaIndex.value : this.mediaIndex, downloadFilter: data.downloadFilter.present ? data.downloadFilter.value : this.downloadFilter, ); } @override String toString() { return (StringBuffer('SyncRuleItem(') ..write('id: $id, ') ..write('profileId: $profileId, ') ..write('serverId: $serverId, ') ..write('ratingKey: $ratingKey, ') ..write('globalKey: $globalKey, ') ..write('targetType: $targetType, ') ..write('episodeCount: $episodeCount, ') ..write('enabled: $enabled, ') ..write('createdAt: $createdAt, ') ..write('lastExecutedAt: $lastExecutedAt, ') ..write('mediaIndex: $mediaIndex, ') ..write('downloadFilter: $downloadFilter') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, profileId, serverId, ratingKey, globalKey, targetType, episodeCount, enabled, createdAt, lastExecutedAt, mediaIndex, downloadFilter, ); @override bool operator ==(Object other) => identical(this, other) || (other is SyncRuleItem && other.id == this.id && other.profileId == this.profileId && other.serverId == this.serverId && other.ratingKey == this.ratingKey && other.globalKey == this.globalKey && other.targetType == this.targetType && other.episodeCount == this.episodeCount && other.enabled == this.enabled && other.createdAt == this.createdAt && other.lastExecutedAt == this.lastExecutedAt && other.mediaIndex == this.mediaIndex && other.downloadFilter == this.downloadFilter); } class SyncRulesCompanion extends UpdateCompanion { final Value id; final Value profileId; final Value serverId; final Value ratingKey; final Value globalKey; final Value targetType; final Value episodeCount; final Value enabled; final Value createdAt; final Value lastExecutedAt; final Value mediaIndex; final Value downloadFilter; const SyncRulesCompanion({ this.id = const Value.absent(), this.profileId = const Value.absent(), this.serverId = const Value.absent(), this.ratingKey = const Value.absent(), this.globalKey = const Value.absent(), this.targetType = const Value.absent(), this.episodeCount = const Value.absent(), this.enabled = const Value.absent(), this.createdAt = const Value.absent(), this.lastExecutedAt = const Value.absent(), this.mediaIndex = const Value.absent(), this.downloadFilter = const Value.absent(), }); SyncRulesCompanion.insert({ this.id = const Value.absent(), this.profileId = const Value.absent(), required String serverId, required String ratingKey, required String globalKey, required String targetType, required int episodeCount, this.enabled = const Value.absent(), required int createdAt, this.lastExecutedAt = const Value.absent(), this.mediaIndex = const Value.absent(), this.downloadFilter = const Value.absent(), }) : serverId = Value(serverId), ratingKey = Value(ratingKey), globalKey = Value(globalKey), targetType = Value(targetType), episodeCount = Value(episodeCount), createdAt = Value(createdAt); static Insertable custom({ Expression? id, Expression? profileId, Expression? serverId, Expression? ratingKey, Expression? globalKey, Expression? targetType, Expression? episodeCount, Expression? enabled, Expression? createdAt, Expression? lastExecutedAt, Expression? mediaIndex, Expression? downloadFilter, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (profileId != null) 'profile_id': profileId, if (serverId != null) 'server_id': serverId, if (ratingKey != null) 'rating_key': ratingKey, if (globalKey != null) 'global_key': globalKey, if (targetType != null) 'target_type': targetType, if (episodeCount != null) 'episode_count': episodeCount, if (enabled != null) 'enabled': enabled, if (createdAt != null) 'created_at': createdAt, if (lastExecutedAt != null) 'last_executed_at': lastExecutedAt, if (mediaIndex != null) 'media_index': mediaIndex, if (downloadFilter != null) 'download_filter': downloadFilter, }); } SyncRulesCompanion copyWith({ Value? id, Value? profileId, Value? serverId, Value? ratingKey, Value? globalKey, Value? targetType, Value? episodeCount, Value? enabled, Value? createdAt, Value? lastExecutedAt, Value? mediaIndex, Value? downloadFilter, }) { return SyncRulesCompanion( id: id ?? this.id, profileId: profileId ?? this.profileId, serverId: serverId ?? this.serverId, ratingKey: ratingKey ?? this.ratingKey, globalKey: globalKey ?? this.globalKey, targetType: targetType ?? this.targetType, episodeCount: episodeCount ?? this.episodeCount, enabled: enabled ?? this.enabled, createdAt: createdAt ?? this.createdAt, lastExecutedAt: lastExecutedAt ?? this.lastExecutedAt, mediaIndex: mediaIndex ?? this.mediaIndex, downloadFilter: downloadFilter ?? this.downloadFilter, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (profileId.present) { map['profile_id'] = Variable(profileId.value); } if (serverId.present) { map['server_id'] = Variable(serverId.value); } if (ratingKey.present) { map['rating_key'] = Variable(ratingKey.value); } if (globalKey.present) { map['global_key'] = Variable(globalKey.value); } if (targetType.present) { map['target_type'] = Variable(targetType.value); } if (episodeCount.present) { map['episode_count'] = Variable(episodeCount.value); } if (enabled.present) { map['enabled'] = Variable(enabled.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (lastExecutedAt.present) { map['last_executed_at'] = Variable(lastExecutedAt.value); } if (mediaIndex.present) { map['media_index'] = Variable(mediaIndex.value); } if (downloadFilter.present) { map['download_filter'] = Variable(downloadFilter.value); } return map; } @override String toString() { return (StringBuffer('SyncRulesCompanion(') ..write('id: $id, ') ..write('profileId: $profileId, ') ..write('serverId: $serverId, ') ..write('ratingKey: $ratingKey, ') ..write('globalKey: $globalKey, ') ..write('targetType: $targetType, ') ..write('episodeCount: $episodeCount, ') ..write('enabled: $enabled, ') ..write('createdAt: $createdAt, ') ..write('lastExecutedAt: $lastExecutedAt, ') ..write('mediaIndex: $mediaIndex, ') ..write('downloadFilter: $downloadFilter') ..write(')')) .toString(); } } class $ConnectionsTable extends Connections with TableInfo<$ConnectionsTable, ConnectionRow> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ConnectionsTable(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 _kindMeta = const VerificationMeta('kind'); @override late final GeneratedColumn kind = GeneratedColumn( 'kind', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _displayNameMeta = const VerificationMeta( 'displayName', ); @override late final GeneratedColumn displayName = GeneratedColumn( 'display_name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _configJsonMeta = const VerificationMeta( 'configJson', ); @override late final GeneratedColumn configJson = GeneratedColumn( 'config_json', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDefaultMeta = const VerificationMeta( 'isDefault', ); @override late final GeneratedColumn isDefault = GeneratedColumn( 'is_default', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_default" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthenticatedAtMeta = const VerificationMeta('lastAuthenticatedAt'); @override late final GeneratedColumn lastAuthenticatedAt = GeneratedColumn( 'last_authenticated_at', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); @override List get $columns => [ id, kind, displayName, configJson, isDefault, createdAt, lastAuthenticatedAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'connections'; @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('kind')) { context.handle( _kindMeta, kind.isAcceptableOrUnknown(data['kind']!, _kindMeta), ); } else if (isInserting) { context.missing(_kindMeta); } if (data.containsKey('display_name')) { context.handle( _displayNameMeta, displayName.isAcceptableOrUnknown( data['display_name']!, _displayNameMeta, ), ); } else if (isInserting) { context.missing(_displayNameMeta); } if (data.containsKey('config_json')) { context.handle( _configJsonMeta, configJson.isAcceptableOrUnknown(data['config_json']!, _configJsonMeta), ); } else if (isInserting) { context.missing(_configJsonMeta); } if (data.containsKey('is_default')) { context.handle( _isDefaultMeta, isDefault.isAcceptableOrUnknown(data['is_default']!, _isDefaultMeta), ); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('last_authenticated_at')) { context.handle( _lastAuthenticatedAtMeta, lastAuthenticatedAt.isAcceptableOrUnknown( data['last_authenticated_at']!, _lastAuthenticatedAtMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override ConnectionRow map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ConnectionRow( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, kind: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}kind'], )!, displayName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}display_name'], )!, configJson: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}config_json'], )!, isDefault: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_default'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, lastAuthenticatedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}last_authenticated_at'], ), ); } @override $ConnectionsTable createAlias(String alias) { return $ConnectionsTable(attachedDatabase, alias); } } class ConnectionRow extends DataClass implements Insertable { /// Stable identifier for the connection. For Plex it's a generated UUID /// (one per account); for Jellyfin it's the server's machineId. final String id; /// Backend kind: `'plex'` or `'jellyfin'`. final String kind; /// User-visible label (account email, server name). final String displayName; /// Backend-specific config payload (token, baseUrl, profile id, …). final String configJson; /// Whether this is the default connection used at app launch when only /// one connection is present. final bool isDefault; /// Timestamp this connection was added (milliseconds since epoch). final int createdAt; /// Timestamp of the most-recent successful auth refresh (milliseconds /// since epoch). Null until the first successful auth. final int? lastAuthenticatedAt; const ConnectionRow({ required this.id, required this.kind, required this.displayName, required this.configJson, required this.isDefault, required this.createdAt, this.lastAuthenticatedAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['kind'] = Variable(kind); map['display_name'] = Variable(displayName); map['config_json'] = Variable(configJson); map['is_default'] = Variable(isDefault); map['created_at'] = Variable(createdAt); if (!nullToAbsent || lastAuthenticatedAt != null) { map['last_authenticated_at'] = Variable(lastAuthenticatedAt); } return map; } ConnectionsCompanion toCompanion(bool nullToAbsent) { return ConnectionsCompanion( id: Value(id), kind: Value(kind), displayName: Value(displayName), configJson: Value(configJson), isDefault: Value(isDefault), createdAt: Value(createdAt), lastAuthenticatedAt: lastAuthenticatedAt == null && nullToAbsent ? const Value.absent() : Value(lastAuthenticatedAt), ); } factory ConnectionRow.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ConnectionRow( id: serializer.fromJson(json['id']), kind: serializer.fromJson(json['kind']), displayName: serializer.fromJson(json['displayName']), configJson: serializer.fromJson(json['configJson']), isDefault: serializer.fromJson(json['isDefault']), createdAt: serializer.fromJson(json['createdAt']), lastAuthenticatedAt: serializer.fromJson( json['lastAuthenticatedAt'], ), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'kind': serializer.toJson(kind), 'displayName': serializer.toJson(displayName), 'configJson': serializer.toJson(configJson), 'isDefault': serializer.toJson(isDefault), 'createdAt': serializer.toJson(createdAt), 'lastAuthenticatedAt': serializer.toJson(lastAuthenticatedAt), }; } ConnectionRow copyWith({ String? id, String? kind, String? displayName, String? configJson, bool? isDefault, int? createdAt, Value lastAuthenticatedAt = const Value.absent(), }) => ConnectionRow( id: id ?? this.id, kind: kind ?? this.kind, displayName: displayName ?? this.displayName, configJson: configJson ?? this.configJson, isDefault: isDefault ?? this.isDefault, createdAt: createdAt ?? this.createdAt, lastAuthenticatedAt: lastAuthenticatedAt.present ? lastAuthenticatedAt.value : this.lastAuthenticatedAt, ); ConnectionRow copyWithCompanion(ConnectionsCompanion data) { return ConnectionRow( id: data.id.present ? data.id.value : this.id, kind: data.kind.present ? data.kind.value : this.kind, displayName: data.displayName.present ? data.displayName.value : this.displayName, configJson: data.configJson.present ? data.configJson.value : this.configJson, isDefault: data.isDefault.present ? data.isDefault.value : this.isDefault, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, lastAuthenticatedAt: data.lastAuthenticatedAt.present ? data.lastAuthenticatedAt.value : this.lastAuthenticatedAt, ); } @override String toString() { return (StringBuffer('ConnectionRow(') ..write('id: $id, ') ..write('kind: $kind, ') ..write('displayName: $displayName, ') ..write('configJson: $configJson, ') ..write('isDefault: $isDefault, ') ..write('createdAt: $createdAt, ') ..write('lastAuthenticatedAt: $lastAuthenticatedAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, kind, displayName, configJson, isDefault, createdAt, lastAuthenticatedAt, ); @override bool operator ==(Object other) => identical(this, other) || (other is ConnectionRow && other.id == this.id && other.kind == this.kind && other.displayName == this.displayName && other.configJson == this.configJson && other.isDefault == this.isDefault && other.createdAt == this.createdAt && other.lastAuthenticatedAt == this.lastAuthenticatedAt); } class ConnectionsCompanion extends UpdateCompanion { final Value id; final Value kind; final Value displayName; final Value configJson; final Value isDefault; final Value createdAt; final Value lastAuthenticatedAt; final Value rowid; const ConnectionsCompanion({ this.id = const Value.absent(), this.kind = const Value.absent(), this.displayName = const Value.absent(), this.configJson = const Value.absent(), this.isDefault = const Value.absent(), this.createdAt = const Value.absent(), this.lastAuthenticatedAt = const Value.absent(), this.rowid = const Value.absent(), }); ConnectionsCompanion.insert({ required String id, required String kind, required String displayName, required String configJson, this.isDefault = const Value.absent(), required int createdAt, this.lastAuthenticatedAt = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), kind = Value(kind), displayName = Value(displayName), configJson = Value(configJson), createdAt = Value(createdAt); static Insertable custom({ Expression? id, Expression? kind, Expression? displayName, Expression? configJson, Expression? isDefault, Expression? createdAt, Expression? lastAuthenticatedAt, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (kind != null) 'kind': kind, if (displayName != null) 'display_name': displayName, if (configJson != null) 'config_json': configJson, if (isDefault != null) 'is_default': isDefault, if (createdAt != null) 'created_at': createdAt, if (lastAuthenticatedAt != null) 'last_authenticated_at': lastAuthenticatedAt, if (rowid != null) 'rowid': rowid, }); } ConnectionsCompanion copyWith({ Value? id, Value? kind, Value? displayName, Value? configJson, Value? isDefault, Value? createdAt, Value? lastAuthenticatedAt, Value? rowid, }) { return ConnectionsCompanion( id: id ?? this.id, kind: kind ?? this.kind, displayName: displayName ?? this.displayName, configJson: configJson ?? this.configJson, isDefault: isDefault ?? this.isDefault, createdAt: createdAt ?? this.createdAt, lastAuthenticatedAt: lastAuthenticatedAt ?? this.lastAuthenticatedAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (kind.present) { map['kind'] = Variable(kind.value); } if (displayName.present) { map['display_name'] = Variable(displayName.value); } if (configJson.present) { map['config_json'] = Variable(configJson.value); } if (isDefault.present) { map['is_default'] = Variable(isDefault.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (lastAuthenticatedAt.present) { map['last_authenticated_at'] = Variable(lastAuthenticatedAt.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ConnectionsCompanion(') ..write('id: $id, ') ..write('kind: $kind, ') ..write('displayName: $displayName, ') ..write('configJson: $configJson, ') ..write('isDefault: $isDefault, ') ..write('createdAt: $createdAt, ') ..write('lastAuthenticatedAt: $lastAuthenticatedAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $ProfilesTable extends Profiles with TableInfo<$ProfilesTable, ProfileRow> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ProfilesTable(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 _kindMeta = const VerificationMeta('kind'); @override late final GeneratedColumn kind = GeneratedColumn( 'kind', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _displayNameMeta = const VerificationMeta( 'displayName', ); @override late final GeneratedColumn displayName = GeneratedColumn( 'display_name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _avatarThumbUrlMeta = const VerificationMeta( 'avatarThumbUrl', ); @override late final GeneratedColumn avatarThumbUrl = GeneratedColumn( 'avatar_thumb_url', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _configJsonMeta = const VerificationMeta( 'configJson', ); @override late final GeneratedColumn configJson = GeneratedColumn( 'config_json', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _sortOrderMeta = const VerificationMeta( 'sortOrder', ); @override late final GeneratedColumn sortOrder = GeneratedColumn( 'sort_order', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _lastUsedAtMeta = const VerificationMeta( 'lastUsedAt', ); @override late final GeneratedColumn lastUsedAt = GeneratedColumn( 'last_used_at', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); @override List get $columns => [ id, kind, displayName, avatarThumbUrl, configJson, sortOrder, createdAt, lastUsedAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'profiles'; @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('kind')) { context.handle( _kindMeta, kind.isAcceptableOrUnknown(data['kind']!, _kindMeta), ); } else if (isInserting) { context.missing(_kindMeta); } if (data.containsKey('display_name')) { context.handle( _displayNameMeta, displayName.isAcceptableOrUnknown( data['display_name']!, _displayNameMeta, ), ); } else if (isInserting) { context.missing(_displayNameMeta); } if (data.containsKey('avatar_thumb_url')) { context.handle( _avatarThumbUrlMeta, avatarThumbUrl.isAcceptableOrUnknown( data['avatar_thumb_url']!, _avatarThumbUrlMeta, ), ); } if (data.containsKey('config_json')) { context.handle( _configJsonMeta, configJson.isAcceptableOrUnknown(data['config_json']!, _configJsonMeta), ); } else if (isInserting) { context.missing(_configJsonMeta); } if (data.containsKey('sort_order')) { context.handle( _sortOrderMeta, sortOrder.isAcceptableOrUnknown(data['sort_order']!, _sortOrderMeta), ); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('last_used_at')) { context.handle( _lastUsedAtMeta, lastUsedAt.isAcceptableOrUnknown( data['last_used_at']!, _lastUsedAtMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override ProfileRow map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ProfileRow( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, kind: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}kind'], )!, displayName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}display_name'], )!, avatarThumbUrl: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}avatar_thumb_url'], ), configJson: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}config_json'], )!, sortOrder: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sort_order'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, lastUsedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}last_used_at'], ), ); } @override $ProfilesTable createAlias(String alias) { return $ProfilesTable(attachedDatabase, alias); } } class ProfileRow extends DataClass implements Insertable { /// Stable identifier. For Plex Home profiles: `plex-home-{accountId}-{homeUserUuid}` /// (deterministic so re-discovery is idempotent). For locals: `local-{uuid}`. final String id; /// `'local'` | `'plex_home'`. final String kind; final String displayName; /// Plex Home users have a thumb URL; locals fall back to initials/colour. final String? avatarThumbUrl; /// Per-kind config: /// - `local`: `{ "pinHash": "..." }` /// - `plex_home`: `{ "restricted": bool, "admin": bool, "hasPassword": bool, "parentConnectionId": "..." }` final String configJson; final int sortOrder; final int createdAt; final int? lastUsedAt; const ProfileRow({ required this.id, required this.kind, required this.displayName, this.avatarThumbUrl, required this.configJson, required this.sortOrder, required this.createdAt, this.lastUsedAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['kind'] = Variable(kind); map['display_name'] = Variable(displayName); if (!nullToAbsent || avatarThumbUrl != null) { map['avatar_thumb_url'] = Variable(avatarThumbUrl); } map['config_json'] = Variable(configJson); map['sort_order'] = Variable(sortOrder); map['created_at'] = Variable(createdAt); if (!nullToAbsent || lastUsedAt != null) { map['last_used_at'] = Variable(lastUsedAt); } return map; } ProfilesCompanion toCompanion(bool nullToAbsent) { return ProfilesCompanion( id: Value(id), kind: Value(kind), displayName: Value(displayName), avatarThumbUrl: avatarThumbUrl == null && nullToAbsent ? const Value.absent() : Value(avatarThumbUrl), configJson: Value(configJson), sortOrder: Value(sortOrder), createdAt: Value(createdAt), lastUsedAt: lastUsedAt == null && nullToAbsent ? const Value.absent() : Value(lastUsedAt), ); } factory ProfileRow.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ProfileRow( id: serializer.fromJson(json['id']), kind: serializer.fromJson(json['kind']), displayName: serializer.fromJson(json['displayName']), avatarThumbUrl: serializer.fromJson(json['avatarThumbUrl']), configJson: serializer.fromJson(json['configJson']), sortOrder: serializer.fromJson(json['sortOrder']), createdAt: serializer.fromJson(json['createdAt']), lastUsedAt: serializer.fromJson(json['lastUsedAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'kind': serializer.toJson(kind), 'displayName': serializer.toJson(displayName), 'avatarThumbUrl': serializer.toJson(avatarThumbUrl), 'configJson': serializer.toJson(configJson), 'sortOrder': serializer.toJson(sortOrder), 'createdAt': serializer.toJson(createdAt), 'lastUsedAt': serializer.toJson(lastUsedAt), }; } ProfileRow copyWith({ String? id, String? kind, String? displayName, Value avatarThumbUrl = const Value.absent(), String? configJson, int? sortOrder, int? createdAt, Value lastUsedAt = const Value.absent(), }) => ProfileRow( id: id ?? this.id, kind: kind ?? this.kind, displayName: displayName ?? this.displayName, avatarThumbUrl: avatarThumbUrl.present ? avatarThumbUrl.value : this.avatarThumbUrl, configJson: configJson ?? this.configJson, sortOrder: sortOrder ?? this.sortOrder, createdAt: createdAt ?? this.createdAt, lastUsedAt: lastUsedAt.present ? lastUsedAt.value : this.lastUsedAt, ); ProfileRow copyWithCompanion(ProfilesCompanion data) { return ProfileRow( id: data.id.present ? data.id.value : this.id, kind: data.kind.present ? data.kind.value : this.kind, displayName: data.displayName.present ? data.displayName.value : this.displayName, avatarThumbUrl: data.avatarThumbUrl.present ? data.avatarThumbUrl.value : this.avatarThumbUrl, configJson: data.configJson.present ? data.configJson.value : this.configJson, sortOrder: data.sortOrder.present ? data.sortOrder.value : this.sortOrder, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, lastUsedAt: data.lastUsedAt.present ? data.lastUsedAt.value : this.lastUsedAt, ); } @override String toString() { return (StringBuffer('ProfileRow(') ..write('id: $id, ') ..write('kind: $kind, ') ..write('displayName: $displayName, ') ..write('avatarThumbUrl: $avatarThumbUrl, ') ..write('configJson: $configJson, ') ..write('sortOrder: $sortOrder, ') ..write('createdAt: $createdAt, ') ..write('lastUsedAt: $lastUsedAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, kind, displayName, avatarThumbUrl, configJson, sortOrder, createdAt, lastUsedAt, ); @override bool operator ==(Object other) => identical(this, other) || (other is ProfileRow && other.id == this.id && other.kind == this.kind && other.displayName == this.displayName && other.avatarThumbUrl == this.avatarThumbUrl && other.configJson == this.configJson && other.sortOrder == this.sortOrder && other.createdAt == this.createdAt && other.lastUsedAt == this.lastUsedAt); } class ProfilesCompanion extends UpdateCompanion { final Value id; final Value kind; final Value displayName; final Value avatarThumbUrl; final Value configJson; final Value sortOrder; final Value createdAt; final Value lastUsedAt; final Value rowid; const ProfilesCompanion({ this.id = const Value.absent(), this.kind = const Value.absent(), this.displayName = const Value.absent(), this.avatarThumbUrl = const Value.absent(), this.configJson = const Value.absent(), this.sortOrder = const Value.absent(), this.createdAt = const Value.absent(), this.lastUsedAt = const Value.absent(), this.rowid = const Value.absent(), }); ProfilesCompanion.insert({ required String id, required String kind, required String displayName, this.avatarThumbUrl = const Value.absent(), required String configJson, this.sortOrder = const Value.absent(), required int createdAt, this.lastUsedAt = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), kind = Value(kind), displayName = Value(displayName), configJson = Value(configJson), createdAt = Value(createdAt); static Insertable custom({ Expression? id, Expression? kind, Expression? displayName, Expression? avatarThumbUrl, Expression? configJson, Expression? sortOrder, Expression? createdAt, Expression? lastUsedAt, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (kind != null) 'kind': kind, if (displayName != null) 'display_name': displayName, if (avatarThumbUrl != null) 'avatar_thumb_url': avatarThumbUrl, if (configJson != null) 'config_json': configJson, if (sortOrder != null) 'sort_order': sortOrder, if (createdAt != null) 'created_at': createdAt, if (lastUsedAt != null) 'last_used_at': lastUsedAt, if (rowid != null) 'rowid': rowid, }); } ProfilesCompanion copyWith({ Value? id, Value? kind, Value? displayName, Value? avatarThumbUrl, Value? configJson, Value? sortOrder, Value? createdAt, Value? lastUsedAt, Value? rowid, }) { return ProfilesCompanion( id: id ?? this.id, kind: kind ?? this.kind, displayName: displayName ?? this.displayName, avatarThumbUrl: avatarThumbUrl ?? this.avatarThumbUrl, configJson: configJson ?? this.configJson, sortOrder: sortOrder ?? this.sortOrder, createdAt: createdAt ?? this.createdAt, lastUsedAt: lastUsedAt ?? this.lastUsedAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (kind.present) { map['kind'] = Variable(kind.value); } if (displayName.present) { map['display_name'] = Variable(displayName.value); } if (avatarThumbUrl.present) { map['avatar_thumb_url'] = Variable(avatarThumbUrl.value); } if (configJson.present) { map['config_json'] = Variable(configJson.value); } if (sortOrder.present) { map['sort_order'] = Variable(sortOrder.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (lastUsedAt.present) { map['last_used_at'] = Variable(lastUsedAt.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ProfilesCompanion(') ..write('id: $id, ') ..write('kind: $kind, ') ..write('displayName: $displayName, ') ..write('avatarThumbUrl: $avatarThumbUrl, ') ..write('configJson: $configJson, ') ..write('sortOrder: $sortOrder, ') ..write('createdAt: $createdAt, ') ..write('lastUsedAt: $lastUsedAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $ProfileConnectionsTable extends ProfileConnections with TableInfo<$ProfileConnectionsTable, ProfileConnectionRow> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ProfileConnectionsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _profileIdMeta = const VerificationMeta( 'profileId', ); @override late final GeneratedColumn profileId = GeneratedColumn( 'profile_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _connectionIdMeta = const VerificationMeta( 'connectionId', ); @override late final GeneratedColumn connectionId = GeneratedColumn( 'connection_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES connections (id) ON DELETE CASCADE', ), ); static const VerificationMeta _userTokenMeta = const VerificationMeta( 'userToken', ); @override late final GeneratedColumn userToken = GeneratedColumn( 'user_token', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant(''), ); static const VerificationMeta _userIdentifierMeta = const VerificationMeta( 'userIdentifier', ); @override late final GeneratedColumn userIdentifier = GeneratedColumn( 'user_identifier', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDefaultMeta = const VerificationMeta( 'isDefault', ); @override late final GeneratedColumn isDefault = GeneratedColumn( 'is_default', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_default" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _tokenAcquiredAtMeta = const VerificationMeta( 'tokenAcquiredAt', ); @override late final GeneratedColumn tokenAcquiredAt = GeneratedColumn( 'token_acquired_at', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _lastUsedAtMeta = const VerificationMeta( 'lastUsedAt', ); @override late final GeneratedColumn lastUsedAt = GeneratedColumn( 'last_used_at', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); @override List get $columns => [ profileId, connectionId, userToken, userIdentifier, isDefault, tokenAcquiredAt, lastUsedAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'profile_connections'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('profile_id')) { context.handle( _profileIdMeta, profileId.isAcceptableOrUnknown(data['profile_id']!, _profileIdMeta), ); } else if (isInserting) { context.missing(_profileIdMeta); } if (data.containsKey('connection_id')) { context.handle( _connectionIdMeta, connectionId.isAcceptableOrUnknown( data['connection_id']!, _connectionIdMeta, ), ); } else if (isInserting) { context.missing(_connectionIdMeta); } if (data.containsKey('user_token')) { context.handle( _userTokenMeta, userToken.isAcceptableOrUnknown(data['user_token']!, _userTokenMeta), ); } if (data.containsKey('user_identifier')) { context.handle( _userIdentifierMeta, userIdentifier.isAcceptableOrUnknown( data['user_identifier']!, _userIdentifierMeta, ), ); } else if (isInserting) { context.missing(_userIdentifierMeta); } if (data.containsKey('is_default')) { context.handle( _isDefaultMeta, isDefault.isAcceptableOrUnknown(data['is_default']!, _isDefaultMeta), ); } if (data.containsKey('token_acquired_at')) { context.handle( _tokenAcquiredAtMeta, tokenAcquiredAt.isAcceptableOrUnknown( data['token_acquired_at']!, _tokenAcquiredAtMeta, ), ); } if (data.containsKey('last_used_at')) { context.handle( _lastUsedAtMeta, lastUsedAt.isAcceptableOrUnknown( data['last_used_at']!, _lastUsedAtMeta, ), ); } return context; } @override Set get $primaryKey => {profileId, connectionId}; @override ProfileConnectionRow map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ProfileConnectionRow( profileId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}profile_id'], )!, connectionId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}connection_id'], )!, userToken: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}user_token'], )!, userIdentifier: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}user_identifier'], )!, isDefault: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_default'], )!, tokenAcquiredAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}token_acquired_at'], ), lastUsedAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}last_used_at'], ), ); } @override $ProfileConnectionsTable createAlias(String alias) { return $ProfileConnectionsTable(attachedDatabase, alias); } } class ProfileConnectionRow extends DataClass implements Insertable { final String profileId; final String connectionId; final String userToken; final String userIdentifier; final bool isDefault; final int? tokenAcquiredAt; final int? lastUsedAt; const ProfileConnectionRow({ required this.profileId, required this.connectionId, required this.userToken, required this.userIdentifier, required this.isDefault, this.tokenAcquiredAt, this.lastUsedAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['profile_id'] = Variable(profileId); map['connection_id'] = Variable(connectionId); map['user_token'] = Variable(userToken); map['user_identifier'] = Variable(userIdentifier); map['is_default'] = Variable(isDefault); if (!nullToAbsent || tokenAcquiredAt != null) { map['token_acquired_at'] = Variable(tokenAcquiredAt); } if (!nullToAbsent || lastUsedAt != null) { map['last_used_at'] = Variable(lastUsedAt); } return map; } ProfileConnectionsCompanion toCompanion(bool nullToAbsent) { return ProfileConnectionsCompanion( profileId: Value(profileId), connectionId: Value(connectionId), userToken: Value(userToken), userIdentifier: Value(userIdentifier), isDefault: Value(isDefault), tokenAcquiredAt: tokenAcquiredAt == null && nullToAbsent ? const Value.absent() : Value(tokenAcquiredAt), lastUsedAt: lastUsedAt == null && nullToAbsent ? const Value.absent() : Value(lastUsedAt), ); } factory ProfileConnectionRow.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ProfileConnectionRow( profileId: serializer.fromJson(json['profileId']), connectionId: serializer.fromJson(json['connectionId']), userToken: serializer.fromJson(json['userToken']), userIdentifier: serializer.fromJson(json['userIdentifier']), isDefault: serializer.fromJson(json['isDefault']), tokenAcquiredAt: serializer.fromJson(json['tokenAcquiredAt']), lastUsedAt: serializer.fromJson(json['lastUsedAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'profileId': serializer.toJson(profileId), 'connectionId': serializer.toJson(connectionId), 'userToken': serializer.toJson(userToken), 'userIdentifier': serializer.toJson(userIdentifier), 'isDefault': serializer.toJson(isDefault), 'tokenAcquiredAt': serializer.toJson(tokenAcquiredAt), 'lastUsedAt': serializer.toJson(lastUsedAt), }; } ProfileConnectionRow copyWith({ String? profileId, String? connectionId, String? userToken, String? userIdentifier, bool? isDefault, Value tokenAcquiredAt = const Value.absent(), Value lastUsedAt = const Value.absent(), }) => ProfileConnectionRow( profileId: profileId ?? this.profileId, connectionId: connectionId ?? this.connectionId, userToken: userToken ?? this.userToken, userIdentifier: userIdentifier ?? this.userIdentifier, isDefault: isDefault ?? this.isDefault, tokenAcquiredAt: tokenAcquiredAt.present ? tokenAcquiredAt.value : this.tokenAcquiredAt, lastUsedAt: lastUsedAt.present ? lastUsedAt.value : this.lastUsedAt, ); ProfileConnectionRow copyWithCompanion(ProfileConnectionsCompanion data) { return ProfileConnectionRow( profileId: data.profileId.present ? data.profileId.value : this.profileId, connectionId: data.connectionId.present ? data.connectionId.value : this.connectionId, userToken: data.userToken.present ? data.userToken.value : this.userToken, userIdentifier: data.userIdentifier.present ? data.userIdentifier.value : this.userIdentifier, isDefault: data.isDefault.present ? data.isDefault.value : this.isDefault, tokenAcquiredAt: data.tokenAcquiredAt.present ? data.tokenAcquiredAt.value : this.tokenAcquiredAt, lastUsedAt: data.lastUsedAt.present ? data.lastUsedAt.value : this.lastUsedAt, ); } @override String toString() { return (StringBuffer('ProfileConnectionRow(') ..write('profileId: $profileId, ') ..write('connectionId: $connectionId, ') ..write('userToken: $userToken, ') ..write('userIdentifier: $userIdentifier, ') ..write('isDefault: $isDefault, ') ..write('tokenAcquiredAt: $tokenAcquiredAt, ') ..write('lastUsedAt: $lastUsedAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash( profileId, connectionId, userToken, userIdentifier, isDefault, tokenAcquiredAt, lastUsedAt, ); @override bool operator ==(Object other) => identical(this, other) || (other is ProfileConnectionRow && other.profileId == this.profileId && other.connectionId == this.connectionId && other.userToken == this.userToken && other.userIdentifier == this.userIdentifier && other.isDefault == this.isDefault && other.tokenAcquiredAt == this.tokenAcquiredAt && other.lastUsedAt == this.lastUsedAt); } class ProfileConnectionsCompanion extends UpdateCompanion { final Value profileId; final Value connectionId; final Value userToken; final Value userIdentifier; final Value isDefault; final Value tokenAcquiredAt; final Value lastUsedAt; final Value rowid; const ProfileConnectionsCompanion({ this.profileId = const Value.absent(), this.connectionId = const Value.absent(), this.userToken = const Value.absent(), this.userIdentifier = const Value.absent(), this.isDefault = const Value.absent(), this.tokenAcquiredAt = const Value.absent(), this.lastUsedAt = const Value.absent(), this.rowid = const Value.absent(), }); ProfileConnectionsCompanion.insert({ required String profileId, required String connectionId, this.userToken = const Value.absent(), required String userIdentifier, this.isDefault = const Value.absent(), this.tokenAcquiredAt = const Value.absent(), this.lastUsedAt = const Value.absent(), this.rowid = const Value.absent(), }) : profileId = Value(profileId), connectionId = Value(connectionId), userIdentifier = Value(userIdentifier); static Insertable custom({ Expression? profileId, Expression? connectionId, Expression? userToken, Expression? userIdentifier, Expression? isDefault, Expression? tokenAcquiredAt, Expression? lastUsedAt, Expression? rowid, }) { return RawValuesInsertable({ if (profileId != null) 'profile_id': profileId, if (connectionId != null) 'connection_id': connectionId, if (userToken != null) 'user_token': userToken, if (userIdentifier != null) 'user_identifier': userIdentifier, if (isDefault != null) 'is_default': isDefault, if (tokenAcquiredAt != null) 'token_acquired_at': tokenAcquiredAt, if (lastUsedAt != null) 'last_used_at': lastUsedAt, if (rowid != null) 'rowid': rowid, }); } ProfileConnectionsCompanion copyWith({ Value? profileId, Value? connectionId, Value? userToken, Value? userIdentifier, Value? isDefault, Value? tokenAcquiredAt, Value? lastUsedAt, Value? rowid, }) { return ProfileConnectionsCompanion( profileId: profileId ?? this.profileId, connectionId: connectionId ?? this.connectionId, userToken: userToken ?? this.userToken, userIdentifier: userIdentifier ?? this.userIdentifier, isDefault: isDefault ?? this.isDefault, tokenAcquiredAt: tokenAcquiredAt ?? this.tokenAcquiredAt, lastUsedAt: lastUsedAt ?? this.lastUsedAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (profileId.present) { map['profile_id'] = Variable(profileId.value); } if (connectionId.present) { map['connection_id'] = Variable(connectionId.value); } if (userToken.present) { map['user_token'] = Variable(userToken.value); } if (userIdentifier.present) { map['user_identifier'] = Variable(userIdentifier.value); } if (isDefault.present) { map['is_default'] = Variable(isDefault.value); } if (tokenAcquiredAt.present) { map['token_acquired_at'] = Variable(tokenAcquiredAt.value); } if (lastUsedAt.present) { map['last_used_at'] = Variable(lastUsedAt.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ProfileConnectionsCompanion(') ..write('profileId: $profileId, ') ..write('connectionId: $connectionId, ') ..write('userToken: $userToken, ') ..write('userIdentifier: $userIdentifier, ') ..write('isDefault: $isDefault, ') ..write('tokenAcquiredAt: $tokenAcquiredAt, ') ..write('lastUsedAt: $lastUsedAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); $AppDatabaseManager get managers => $AppDatabaseManager(this); late final $DownloadedMediaTable downloadedMedia = $DownloadedMediaTable( this, ); late final $DownloadOwnersTable downloadOwners = $DownloadOwnersTable(this); late final $DownloadQueueTable downloadQueue = $DownloadQueueTable(this); late final $ApiCacheTable apiCache = $ApiCacheTable(this); late final $OfflineWatchProgressTable offlineWatchProgress = $OfflineWatchProgressTable(this); late final $SyncRulesTable syncRules = $SyncRulesTable(this); late final $ConnectionsTable connections = $ConnectionsTable(this); late final $ProfilesTable profiles = $ProfilesTable(this); late final $ProfileConnectionsTable profileConnections = $ProfileConnectionsTable(this); late final Index idxDownloadedMediaStatus = Index( 'idx_downloaded_media_status', 'CREATE INDEX idx_downloaded_media_status ON downloaded_media (status)', ); late final Index idxDownloadedMediaServer = Index( 'idx_downloaded_media_server', 'CREATE INDEX idx_downloaded_media_server ON downloaded_media (server_id)', ); late final Index idxDownloadedMediaParent = Index( 'idx_downloaded_media_parent', 'CREATE INDEX idx_downloaded_media_parent ON downloaded_media (parent_rating_key)', ); late final Index idxDownloadedMediaGrandparent = Index( 'idx_downloaded_media_grandparent', 'CREATE INDEX idx_downloaded_media_grandparent ON downloaded_media (grandparent_rating_key)', ); late final Index idxDownloadOwnersProfile = Index( 'idx_download_owners_profile', 'CREATE INDEX idx_download_owners_profile ON download_owners (profile_id)', ); late final Index idxDownloadOwnersGlobalKey = Index( 'idx_download_owners_global_key', 'CREATE INDEX idx_download_owners_global_key ON download_owners (global_key)', ); late final Index idxOfflineWatchProgressServer = Index( 'idx_offline_watch_progress_server', 'CREATE INDEX idx_offline_watch_progress_server ON offline_watch_progress (server_id)', ); late final Index idxOfflineWatchProgressProfile = Index( 'idx_offline_watch_progress_profile', 'CREATE INDEX idx_offline_watch_progress_profile ON offline_watch_progress (profile_id)', ); late final Index idxSyncRulesProfile = Index( 'idx_sync_rules_profile', 'CREATE INDEX idx_sync_rules_profile ON sync_rules (profile_id)', ); late final Index idxConnectionsKind = Index( 'idx_connections_kind', 'CREATE INDEX idx_connections_kind ON connections (kind)', ); late final Index idxProfilesKind = Index( 'idx_profiles_kind', 'CREATE INDEX idx_profiles_kind ON profiles (kind)', ); late final Index idxProfileConnectionsConnectionId = Index( 'idx_profile_connections_connection_id', 'CREATE INDEX idx_profile_connections_connection_id ON profile_connections (connection_id)', ); late final Index idxProfileConnectionsProfileId = Index( 'idx_profile_connections_profile_id', 'CREATE INDEX idx_profile_connections_profile_id ON profile_connections (profile_id)', ); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ downloadedMedia, downloadOwners, downloadQueue, apiCache, offlineWatchProgress, syncRules, connections, profiles, profileConnections, idxDownloadedMediaStatus, idxDownloadedMediaServer, idxDownloadedMediaParent, idxDownloadedMediaGrandparent, idxDownloadOwnersProfile, idxDownloadOwnersGlobalKey, idxOfflineWatchProgressServer, idxOfflineWatchProgressProfile, idxSyncRulesProfile, idxConnectionsKind, idxProfilesKind, idxProfileConnectionsConnectionId, idxProfileConnectionsProfileId, ]; @override StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([ WritePropagation( on: TableUpdateQuery.onTableName( 'connections', limitUpdateKind: UpdateKind.delete, ), result: [TableUpdate('profile_connections', kind: UpdateKind.delete)], ), ]); } typedef $$DownloadedMediaTableCreateCompanionBuilder = DownloadedMediaCompanion Function({ Value id, required String serverId, Value clientScopeId, required String ratingKey, required String globalKey, required String type, Value parentRatingKey, Value grandparentRatingKey, required int status, Value progress, Value totalBytes, Value downloadedBytes, Value videoFilePath, Value thumbPath, Value downloadedAt, Value errorMessage, Value retryCount, Value bgTaskId, Value mediaIndex, Value mediaSourceId, }); typedef $$DownloadedMediaTableUpdateCompanionBuilder = DownloadedMediaCompanion Function({ Value id, Value serverId, Value clientScopeId, Value ratingKey, Value globalKey, Value type, Value parentRatingKey, Value grandparentRatingKey, Value status, Value progress, Value totalBytes, Value downloadedBytes, Value videoFilePath, Value thumbPath, Value downloadedAt, Value errorMessage, Value retryCount, Value bgTaskId, Value mediaIndex, Value mediaSourceId, }); class $$DownloadedMediaTableFilterComposer extends Composer<_$AppDatabase, $DownloadedMediaTable> { $$DownloadedMediaTableFilterComposer({ 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 serverId => $composableBuilder( column: $table.serverId, builder: (column) => ColumnFilters(column), ); ColumnFilters get clientScopeId => $composableBuilder( column: $table.clientScopeId, builder: (column) => ColumnFilters(column), ); ColumnFilters get ratingKey => $composableBuilder( column: $table.ratingKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get type => $composableBuilder( column: $table.type, builder: (column) => ColumnFilters(column), ); ColumnFilters get parentRatingKey => $composableBuilder( column: $table.parentRatingKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get grandparentRatingKey => $composableBuilder( column: $table.grandparentRatingKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get status => $composableBuilder( column: $table.status, builder: (column) => ColumnFilters(column), ); ColumnFilters get progress => $composableBuilder( column: $table.progress, builder: (column) => ColumnFilters(column), ); ColumnFilters get totalBytes => $composableBuilder( column: $table.totalBytes, builder: (column) => ColumnFilters(column), ); ColumnFilters get downloadedBytes => $composableBuilder( column: $table.downloadedBytes, builder: (column) => ColumnFilters(column), ); ColumnFilters get videoFilePath => $composableBuilder( column: $table.videoFilePath, builder: (column) => ColumnFilters(column), ); ColumnFilters get thumbPath => $composableBuilder( column: $table.thumbPath, builder: (column) => ColumnFilters(column), ); ColumnFilters get downloadedAt => $composableBuilder( column: $table.downloadedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get errorMessage => $composableBuilder( column: $table.errorMessage, builder: (column) => ColumnFilters(column), ); ColumnFilters get retryCount => $composableBuilder( column: $table.retryCount, builder: (column) => ColumnFilters(column), ); ColumnFilters get bgTaskId => $composableBuilder( column: $table.bgTaskId, builder: (column) => ColumnFilters(column), ); ColumnFilters get mediaIndex => $composableBuilder( column: $table.mediaIndex, builder: (column) => ColumnFilters(column), ); ColumnFilters get mediaSourceId => $composableBuilder( column: $table.mediaSourceId, builder: (column) => ColumnFilters(column), ); } class $$DownloadedMediaTableOrderingComposer extends Composer<_$AppDatabase, $DownloadedMediaTable> { $$DownloadedMediaTableOrderingComposer({ 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 serverId => $composableBuilder( column: $table.serverId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get clientScopeId => $composableBuilder( column: $table.clientScopeId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get ratingKey => $composableBuilder( column: $table.ratingKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get type => $composableBuilder( column: $table.type, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentRatingKey => $composableBuilder( column: $table.parentRatingKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get grandparentRatingKey => $composableBuilder( column: $table.grandparentRatingKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get status => $composableBuilder( column: $table.status, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get progress => $composableBuilder( column: $table.progress, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get totalBytes => $composableBuilder( column: $table.totalBytes, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get downloadedBytes => $composableBuilder( column: $table.downloadedBytes, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get videoFilePath => $composableBuilder( column: $table.videoFilePath, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get thumbPath => $composableBuilder( column: $table.thumbPath, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get downloadedAt => $composableBuilder( column: $table.downloadedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get errorMessage => $composableBuilder( column: $table.errorMessage, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get retryCount => $composableBuilder( column: $table.retryCount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get bgTaskId => $composableBuilder( column: $table.bgTaskId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get mediaIndex => $composableBuilder( column: $table.mediaIndex, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get mediaSourceId => $composableBuilder( column: $table.mediaSourceId, builder: (column) => ColumnOrderings(column), ); } class $$DownloadedMediaTableAnnotationComposer extends Composer<_$AppDatabase, $DownloadedMediaTable> { $$DownloadedMediaTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get serverId => $composableBuilder(column: $table.serverId, builder: (column) => column); GeneratedColumn get clientScopeId => $composableBuilder( column: $table.clientScopeId, builder: (column) => column, ); GeneratedColumn get ratingKey => $composableBuilder(column: $table.ratingKey, builder: (column) => column); GeneratedColumn get globalKey => $composableBuilder(column: $table.globalKey, builder: (column) => column); GeneratedColumn get type => $composableBuilder(column: $table.type, builder: (column) => column); GeneratedColumn get parentRatingKey => $composableBuilder( column: $table.parentRatingKey, builder: (column) => column, ); GeneratedColumn get grandparentRatingKey => $composableBuilder( column: $table.grandparentRatingKey, builder: (column) => column, ); GeneratedColumn get status => $composableBuilder(column: $table.status, builder: (column) => column); GeneratedColumn get progress => $composableBuilder(column: $table.progress, builder: (column) => column); GeneratedColumn get totalBytes => $composableBuilder( column: $table.totalBytes, builder: (column) => column, ); GeneratedColumn get downloadedBytes => $composableBuilder( column: $table.downloadedBytes, builder: (column) => column, ); GeneratedColumn get videoFilePath => $composableBuilder( column: $table.videoFilePath, builder: (column) => column, ); GeneratedColumn get thumbPath => $composableBuilder(column: $table.thumbPath, builder: (column) => column); GeneratedColumn get downloadedAt => $composableBuilder( column: $table.downloadedAt, builder: (column) => column, ); GeneratedColumn get errorMessage => $composableBuilder( column: $table.errorMessage, builder: (column) => column, ); GeneratedColumn get retryCount => $composableBuilder( column: $table.retryCount, builder: (column) => column, ); GeneratedColumn get bgTaskId => $composableBuilder(column: $table.bgTaskId, builder: (column) => column); GeneratedColumn get mediaIndex => $composableBuilder( column: $table.mediaIndex, builder: (column) => column, ); GeneratedColumn get mediaSourceId => $composableBuilder( column: $table.mediaSourceId, builder: (column) => column, ); } class $$DownloadedMediaTableTableManager extends RootTableManager< _$AppDatabase, $DownloadedMediaTable, DownloadedMediaItem, $$DownloadedMediaTableFilterComposer, $$DownloadedMediaTableOrderingComposer, $$DownloadedMediaTableAnnotationComposer, $$DownloadedMediaTableCreateCompanionBuilder, $$DownloadedMediaTableUpdateCompanionBuilder, ( DownloadedMediaItem, BaseReferences< _$AppDatabase, $DownloadedMediaTable, DownloadedMediaItem >, ), DownloadedMediaItem, PrefetchHooks Function() > { $$DownloadedMediaTableTableManager( _$AppDatabase db, $DownloadedMediaTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$DownloadedMediaTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$DownloadedMediaTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$DownloadedMediaTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value serverId = const Value.absent(), Value clientScopeId = const Value.absent(), Value ratingKey = const Value.absent(), Value globalKey = const Value.absent(), Value type = const Value.absent(), Value parentRatingKey = const Value.absent(), Value grandparentRatingKey = const Value.absent(), Value status = const Value.absent(), Value progress = const Value.absent(), Value totalBytes = const Value.absent(), Value downloadedBytes = const Value.absent(), Value videoFilePath = const Value.absent(), Value thumbPath = const Value.absent(), Value downloadedAt = const Value.absent(), Value errorMessage = const Value.absent(), Value retryCount = const Value.absent(), Value bgTaskId = const Value.absent(), Value mediaIndex = const Value.absent(), Value mediaSourceId = const Value.absent(), }) => DownloadedMediaCompanion( id: id, serverId: serverId, clientScopeId: clientScopeId, ratingKey: ratingKey, globalKey: globalKey, type: type, parentRatingKey: parentRatingKey, grandparentRatingKey: grandparentRatingKey, status: status, progress: progress, totalBytes: totalBytes, downloadedBytes: downloadedBytes, videoFilePath: videoFilePath, thumbPath: thumbPath, downloadedAt: downloadedAt, errorMessage: errorMessage, retryCount: retryCount, bgTaskId: bgTaskId, mediaIndex: mediaIndex, mediaSourceId: mediaSourceId, ), createCompanionCallback: ({ Value id = const Value.absent(), required String serverId, Value clientScopeId = const Value.absent(), required String ratingKey, required String globalKey, required String type, Value parentRatingKey = const Value.absent(), Value grandparentRatingKey = const Value.absent(), required int status, Value progress = const Value.absent(), Value totalBytes = const Value.absent(), Value downloadedBytes = const Value.absent(), Value videoFilePath = const Value.absent(), Value thumbPath = const Value.absent(), Value downloadedAt = const Value.absent(), Value errorMessage = const Value.absent(), Value retryCount = const Value.absent(), Value bgTaskId = const Value.absent(), Value mediaIndex = const Value.absent(), Value mediaSourceId = const Value.absent(), }) => DownloadedMediaCompanion.insert( id: id, serverId: serverId, clientScopeId: clientScopeId, ratingKey: ratingKey, globalKey: globalKey, type: type, parentRatingKey: parentRatingKey, grandparentRatingKey: grandparentRatingKey, status: status, progress: progress, totalBytes: totalBytes, downloadedBytes: downloadedBytes, videoFilePath: videoFilePath, thumbPath: thumbPath, downloadedAt: downloadedAt, errorMessage: errorMessage, retryCount: retryCount, bgTaskId: bgTaskId, mediaIndex: mediaIndex, mediaSourceId: mediaSourceId, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$DownloadedMediaTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $DownloadedMediaTable, DownloadedMediaItem, $$DownloadedMediaTableFilterComposer, $$DownloadedMediaTableOrderingComposer, $$DownloadedMediaTableAnnotationComposer, $$DownloadedMediaTableCreateCompanionBuilder, $$DownloadedMediaTableUpdateCompanionBuilder, ( DownloadedMediaItem, BaseReferences< _$AppDatabase, $DownloadedMediaTable, DownloadedMediaItem >, ), DownloadedMediaItem, PrefetchHooks Function() >; typedef $$DownloadOwnersTableCreateCompanionBuilder = DownloadOwnersCompanion Function({ required String profileId, required String globalKey, required int createdAt, Value rowid, }); typedef $$DownloadOwnersTableUpdateCompanionBuilder = DownloadOwnersCompanion Function({ Value profileId, Value globalKey, Value createdAt, Value rowid, }); class $$DownloadOwnersTableFilterComposer extends Composer<_$AppDatabase, $DownloadOwnersTable> { $$DownloadOwnersTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnFilters(column), ); ColumnFilters get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); } class $$DownloadOwnersTableOrderingComposer extends Composer<_$AppDatabase, $DownloadOwnersTable> { $$DownloadOwnersTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); } class $$DownloadOwnersTableAnnotationComposer extends Composer<_$AppDatabase, $DownloadOwnersTable> { $$DownloadOwnersTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get profileId => $composableBuilder(column: $table.profileId, builder: (column) => column); GeneratedColumn get globalKey => $composableBuilder(column: $table.globalKey, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); } class $$DownloadOwnersTableTableManager extends RootTableManager< _$AppDatabase, $DownloadOwnersTable, DownloadOwnerItem, $$DownloadOwnersTableFilterComposer, $$DownloadOwnersTableOrderingComposer, $$DownloadOwnersTableAnnotationComposer, $$DownloadOwnersTableCreateCompanionBuilder, $$DownloadOwnersTableUpdateCompanionBuilder, ( DownloadOwnerItem, BaseReferences< _$AppDatabase, $DownloadOwnersTable, DownloadOwnerItem >, ), DownloadOwnerItem, PrefetchHooks Function() > { $$DownloadOwnersTableTableManager( _$AppDatabase db, $DownloadOwnersTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$DownloadOwnersTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$DownloadOwnersTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$DownloadOwnersTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value profileId = const Value.absent(), Value globalKey = const Value.absent(), Value createdAt = const Value.absent(), Value rowid = const Value.absent(), }) => DownloadOwnersCompanion( profileId: profileId, globalKey: globalKey, createdAt: createdAt, rowid: rowid, ), createCompanionCallback: ({ required String profileId, required String globalKey, required int createdAt, Value rowid = const Value.absent(), }) => DownloadOwnersCompanion.insert( profileId: profileId, globalKey: globalKey, createdAt: createdAt, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$DownloadOwnersTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $DownloadOwnersTable, DownloadOwnerItem, $$DownloadOwnersTableFilterComposer, $$DownloadOwnersTableOrderingComposer, $$DownloadOwnersTableAnnotationComposer, $$DownloadOwnersTableCreateCompanionBuilder, $$DownloadOwnersTableUpdateCompanionBuilder, ( DownloadOwnerItem, BaseReferences<_$AppDatabase, $DownloadOwnersTable, DownloadOwnerItem>, ), DownloadOwnerItem, PrefetchHooks Function() >; typedef $$DownloadQueueTableCreateCompanionBuilder = DownloadQueueCompanion Function({ Value id, required String mediaGlobalKey, Value priority, required int addedAt, Value downloadSubtitles, Value downloadArtwork, }); typedef $$DownloadQueueTableUpdateCompanionBuilder = DownloadQueueCompanion Function({ Value id, Value mediaGlobalKey, Value priority, Value addedAt, Value downloadSubtitles, Value downloadArtwork, }); class $$DownloadQueueTableFilterComposer extends Composer<_$AppDatabase, $DownloadQueueTable> { $$DownloadQueueTableFilterComposer({ 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 mediaGlobalKey => $composableBuilder( column: $table.mediaGlobalKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get priority => $composableBuilder( column: $table.priority, builder: (column) => ColumnFilters(column), ); ColumnFilters get addedAt => $composableBuilder( column: $table.addedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get downloadSubtitles => $composableBuilder( column: $table.downloadSubtitles, builder: (column) => ColumnFilters(column), ); ColumnFilters get downloadArtwork => $composableBuilder( column: $table.downloadArtwork, builder: (column) => ColumnFilters(column), ); } class $$DownloadQueueTableOrderingComposer extends Composer<_$AppDatabase, $DownloadQueueTable> { $$DownloadQueueTableOrderingComposer({ 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 mediaGlobalKey => $composableBuilder( column: $table.mediaGlobalKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get priority => $composableBuilder( column: $table.priority, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get addedAt => $composableBuilder( column: $table.addedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get downloadSubtitles => $composableBuilder( column: $table.downloadSubtitles, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get downloadArtwork => $composableBuilder( column: $table.downloadArtwork, builder: (column) => ColumnOrderings(column), ); } class $$DownloadQueueTableAnnotationComposer extends Composer<_$AppDatabase, $DownloadQueueTable> { $$DownloadQueueTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get mediaGlobalKey => $composableBuilder( column: $table.mediaGlobalKey, builder: (column) => column, ); GeneratedColumn get priority => $composableBuilder(column: $table.priority, builder: (column) => column); GeneratedColumn get addedAt => $composableBuilder(column: $table.addedAt, builder: (column) => column); GeneratedColumn get downloadSubtitles => $composableBuilder( column: $table.downloadSubtitles, builder: (column) => column, ); GeneratedColumn get downloadArtwork => $composableBuilder( column: $table.downloadArtwork, builder: (column) => column, ); } class $$DownloadQueueTableTableManager extends RootTableManager< _$AppDatabase, $DownloadQueueTable, DownloadQueueItem, $$DownloadQueueTableFilterComposer, $$DownloadQueueTableOrderingComposer, $$DownloadQueueTableAnnotationComposer, $$DownloadQueueTableCreateCompanionBuilder, $$DownloadQueueTableUpdateCompanionBuilder, ( DownloadQueueItem, BaseReferences< _$AppDatabase, $DownloadQueueTable, DownloadQueueItem >, ), DownloadQueueItem, PrefetchHooks Function() > { $$DownloadQueueTableTableManager(_$AppDatabase db, $DownloadQueueTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$DownloadQueueTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$DownloadQueueTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$DownloadQueueTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value mediaGlobalKey = const Value.absent(), Value priority = const Value.absent(), Value addedAt = const Value.absent(), Value downloadSubtitles = const Value.absent(), Value downloadArtwork = const Value.absent(), }) => DownloadQueueCompanion( id: id, mediaGlobalKey: mediaGlobalKey, priority: priority, addedAt: addedAt, downloadSubtitles: downloadSubtitles, downloadArtwork: downloadArtwork, ), createCompanionCallback: ({ Value id = const Value.absent(), required String mediaGlobalKey, Value priority = const Value.absent(), required int addedAt, Value downloadSubtitles = const Value.absent(), Value downloadArtwork = const Value.absent(), }) => DownloadQueueCompanion.insert( id: id, mediaGlobalKey: mediaGlobalKey, priority: priority, addedAt: addedAt, downloadSubtitles: downloadSubtitles, downloadArtwork: downloadArtwork, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$DownloadQueueTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $DownloadQueueTable, DownloadQueueItem, $$DownloadQueueTableFilterComposer, $$DownloadQueueTableOrderingComposer, $$DownloadQueueTableAnnotationComposer, $$DownloadQueueTableCreateCompanionBuilder, $$DownloadQueueTableUpdateCompanionBuilder, ( DownloadQueueItem, BaseReferences<_$AppDatabase, $DownloadQueueTable, DownloadQueueItem>, ), DownloadQueueItem, PrefetchHooks Function() >; typedef $$ApiCacheTableCreateCompanionBuilder = ApiCacheCompanion Function({ required String cacheKey, required String data, Value pinned, Value cachedAt, Value rowid, }); typedef $$ApiCacheTableUpdateCompanionBuilder = ApiCacheCompanion Function({ Value cacheKey, Value data, Value pinned, Value cachedAt, Value rowid, }); class $$ApiCacheTableFilterComposer extends Composer<_$AppDatabase, $ApiCacheTable> { $$ApiCacheTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get cacheKey => $composableBuilder( column: $table.cacheKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get data => $composableBuilder( column: $table.data, builder: (column) => ColumnFilters(column), ); ColumnFilters get pinned => $composableBuilder( column: $table.pinned, builder: (column) => ColumnFilters(column), ); ColumnFilters get cachedAt => $composableBuilder( column: $table.cachedAt, builder: (column) => ColumnFilters(column), ); } class $$ApiCacheTableOrderingComposer extends Composer<_$AppDatabase, $ApiCacheTable> { $$ApiCacheTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get cacheKey => $composableBuilder( column: $table.cacheKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get data => $composableBuilder( column: $table.data, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get pinned => $composableBuilder( column: $table.pinned, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get cachedAt => $composableBuilder( column: $table.cachedAt, builder: (column) => ColumnOrderings(column), ); } class $$ApiCacheTableAnnotationComposer extends Composer<_$AppDatabase, $ApiCacheTable> { $$ApiCacheTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get cacheKey => $composableBuilder(column: $table.cacheKey, builder: (column) => column); GeneratedColumn get data => $composableBuilder(column: $table.data, builder: (column) => column); GeneratedColumn get pinned => $composableBuilder(column: $table.pinned, builder: (column) => column); GeneratedColumn get cachedAt => $composableBuilder(column: $table.cachedAt, builder: (column) => column); } class $$ApiCacheTableTableManager extends RootTableManager< _$AppDatabase, $ApiCacheTable, ApiCacheData, $$ApiCacheTableFilterComposer, $$ApiCacheTableOrderingComposer, $$ApiCacheTableAnnotationComposer, $$ApiCacheTableCreateCompanionBuilder, $$ApiCacheTableUpdateCompanionBuilder, ( ApiCacheData, BaseReferences<_$AppDatabase, $ApiCacheTable, ApiCacheData>, ), ApiCacheData, PrefetchHooks Function() > { $$ApiCacheTableTableManager(_$AppDatabase db, $ApiCacheTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ApiCacheTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ApiCacheTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ApiCacheTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value cacheKey = const Value.absent(), Value data = const Value.absent(), Value pinned = const Value.absent(), Value cachedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ApiCacheCompanion( cacheKey: cacheKey, data: data, pinned: pinned, cachedAt: cachedAt, rowid: rowid, ), createCompanionCallback: ({ required String cacheKey, required String data, Value pinned = const Value.absent(), Value cachedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ApiCacheCompanion.insert( cacheKey: cacheKey, data: data, pinned: pinned, cachedAt: cachedAt, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$ApiCacheTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ApiCacheTable, ApiCacheData, $$ApiCacheTableFilterComposer, $$ApiCacheTableOrderingComposer, $$ApiCacheTableAnnotationComposer, $$ApiCacheTableCreateCompanionBuilder, $$ApiCacheTableUpdateCompanionBuilder, ( ApiCacheData, BaseReferences<_$AppDatabase, $ApiCacheTable, ApiCacheData>, ), ApiCacheData, PrefetchHooks Function() >; typedef $$OfflineWatchProgressTableCreateCompanionBuilder = OfflineWatchProgressCompanion Function({ Value id, Value profileId, required String serverId, Value clientScopeId, required String ratingKey, required String globalKey, required String actionType, Value viewOffset, Value duration, Value shouldMarkWatched, required int createdAt, required int updatedAt, Value syncAttempts, Value lastError, }); typedef $$OfflineWatchProgressTableUpdateCompanionBuilder = OfflineWatchProgressCompanion Function({ Value id, Value profileId, Value serverId, Value clientScopeId, Value ratingKey, Value globalKey, Value actionType, Value viewOffset, Value duration, Value shouldMarkWatched, Value createdAt, Value updatedAt, Value syncAttempts, Value lastError, }); class $$OfflineWatchProgressTableFilterComposer extends Composer<_$AppDatabase, $OfflineWatchProgressTable> { $$OfflineWatchProgressTableFilterComposer({ 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 profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnFilters(column), ); ColumnFilters get serverId => $composableBuilder( column: $table.serverId, builder: (column) => ColumnFilters(column), ); ColumnFilters get clientScopeId => $composableBuilder( column: $table.clientScopeId, builder: (column) => ColumnFilters(column), ); ColumnFilters get ratingKey => $composableBuilder( column: $table.ratingKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get actionType => $composableBuilder( column: $table.actionType, builder: (column) => ColumnFilters(column), ); ColumnFilters get viewOffset => $composableBuilder( column: $table.viewOffset, builder: (column) => ColumnFilters(column), ); ColumnFilters get duration => $composableBuilder( column: $table.duration, builder: (column) => ColumnFilters(column), ); ColumnFilters get shouldMarkWatched => $composableBuilder( column: $table.shouldMarkWatched, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get syncAttempts => $composableBuilder( column: $table.syncAttempts, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastError => $composableBuilder( column: $table.lastError, builder: (column) => ColumnFilters(column), ); } class $$OfflineWatchProgressTableOrderingComposer extends Composer<_$AppDatabase, $OfflineWatchProgressTable> { $$OfflineWatchProgressTableOrderingComposer({ 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 profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get serverId => $composableBuilder( column: $table.serverId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get clientScopeId => $composableBuilder( column: $table.clientScopeId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get ratingKey => $composableBuilder( column: $table.ratingKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get actionType => $composableBuilder( column: $table.actionType, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get viewOffset => $composableBuilder( column: $table.viewOffset, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get duration => $composableBuilder( column: $table.duration, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get shouldMarkWatched => $composableBuilder( column: $table.shouldMarkWatched, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get syncAttempts => $composableBuilder( column: $table.syncAttempts, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastError => $composableBuilder( column: $table.lastError, builder: (column) => ColumnOrderings(column), ); } class $$OfflineWatchProgressTableAnnotationComposer extends Composer<_$AppDatabase, $OfflineWatchProgressTable> { $$OfflineWatchProgressTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get profileId => $composableBuilder(column: $table.profileId, builder: (column) => column); GeneratedColumn get serverId => $composableBuilder(column: $table.serverId, builder: (column) => column); GeneratedColumn get clientScopeId => $composableBuilder( column: $table.clientScopeId, builder: (column) => column, ); GeneratedColumn get ratingKey => $composableBuilder(column: $table.ratingKey, builder: (column) => column); GeneratedColumn get globalKey => $composableBuilder(column: $table.globalKey, builder: (column) => column); GeneratedColumn get actionType => $composableBuilder( column: $table.actionType, builder: (column) => column, ); GeneratedColumn get viewOffset => $composableBuilder( column: $table.viewOffset, builder: (column) => column, ); GeneratedColumn get duration => $composableBuilder(column: $table.duration, builder: (column) => column); GeneratedColumn get shouldMarkWatched => $composableBuilder( column: $table.shouldMarkWatched, builder: (column) => column, ); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get syncAttempts => $composableBuilder( column: $table.syncAttempts, builder: (column) => column, ); GeneratedColumn get lastError => $composableBuilder(column: $table.lastError, builder: (column) => column); } class $$OfflineWatchProgressTableTableManager extends RootTableManager< _$AppDatabase, $OfflineWatchProgressTable, OfflineWatchProgressItem, $$OfflineWatchProgressTableFilterComposer, $$OfflineWatchProgressTableOrderingComposer, $$OfflineWatchProgressTableAnnotationComposer, $$OfflineWatchProgressTableCreateCompanionBuilder, $$OfflineWatchProgressTableUpdateCompanionBuilder, ( OfflineWatchProgressItem, BaseReferences< _$AppDatabase, $OfflineWatchProgressTable, OfflineWatchProgressItem >, ), OfflineWatchProgressItem, PrefetchHooks Function() > { $$OfflineWatchProgressTableTableManager( _$AppDatabase db, $OfflineWatchProgressTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$OfflineWatchProgressTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$OfflineWatchProgressTableOrderingComposer( $db: db, $table: table, ), createComputedFieldComposer: () => $$OfflineWatchProgressTableAnnotationComposer( $db: db, $table: table, ), updateCompanionCallback: ({ Value id = const Value.absent(), Value profileId = const Value.absent(), Value serverId = const Value.absent(), Value clientScopeId = const Value.absent(), Value ratingKey = const Value.absent(), Value globalKey = const Value.absent(), Value actionType = const Value.absent(), Value viewOffset = const Value.absent(), Value duration = const Value.absent(), Value shouldMarkWatched = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value syncAttempts = const Value.absent(), Value lastError = const Value.absent(), }) => OfflineWatchProgressCompanion( id: id, profileId: profileId, serverId: serverId, clientScopeId: clientScopeId, ratingKey: ratingKey, globalKey: globalKey, actionType: actionType, viewOffset: viewOffset, duration: duration, shouldMarkWatched: shouldMarkWatched, createdAt: createdAt, updatedAt: updatedAt, syncAttempts: syncAttempts, lastError: lastError, ), createCompanionCallback: ({ Value id = const Value.absent(), Value profileId = const Value.absent(), required String serverId, Value clientScopeId = const Value.absent(), required String ratingKey, required String globalKey, required String actionType, Value viewOffset = const Value.absent(), Value duration = const Value.absent(), Value shouldMarkWatched = const Value.absent(), required int createdAt, required int updatedAt, Value syncAttempts = const Value.absent(), Value lastError = const Value.absent(), }) => OfflineWatchProgressCompanion.insert( id: id, profileId: profileId, serverId: serverId, clientScopeId: clientScopeId, ratingKey: ratingKey, globalKey: globalKey, actionType: actionType, viewOffset: viewOffset, duration: duration, shouldMarkWatched: shouldMarkWatched, createdAt: createdAt, updatedAt: updatedAt, syncAttempts: syncAttempts, lastError: lastError, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$OfflineWatchProgressTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $OfflineWatchProgressTable, OfflineWatchProgressItem, $$OfflineWatchProgressTableFilterComposer, $$OfflineWatchProgressTableOrderingComposer, $$OfflineWatchProgressTableAnnotationComposer, $$OfflineWatchProgressTableCreateCompanionBuilder, $$OfflineWatchProgressTableUpdateCompanionBuilder, ( OfflineWatchProgressItem, BaseReferences< _$AppDatabase, $OfflineWatchProgressTable, OfflineWatchProgressItem >, ), OfflineWatchProgressItem, PrefetchHooks Function() >; typedef $$SyncRulesTableCreateCompanionBuilder = SyncRulesCompanion Function({ Value id, Value profileId, required String serverId, required String ratingKey, required String globalKey, required String targetType, required int episodeCount, Value enabled, required int createdAt, Value lastExecutedAt, Value mediaIndex, Value downloadFilter, }); typedef $$SyncRulesTableUpdateCompanionBuilder = SyncRulesCompanion Function({ Value id, Value profileId, Value serverId, Value ratingKey, Value globalKey, Value targetType, Value episodeCount, Value enabled, Value createdAt, Value lastExecutedAt, Value mediaIndex, Value downloadFilter, }); class $$SyncRulesTableFilterComposer extends Composer<_$AppDatabase, $SyncRulesTable> { $$SyncRulesTableFilterComposer({ 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 profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnFilters(column), ); ColumnFilters get serverId => $composableBuilder( column: $table.serverId, builder: (column) => ColumnFilters(column), ); ColumnFilters get ratingKey => $composableBuilder( column: $table.ratingKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get targetType => $composableBuilder( column: $table.targetType, builder: (column) => ColumnFilters(column), ); ColumnFilters get episodeCount => $composableBuilder( column: $table.episodeCount, builder: (column) => ColumnFilters(column), ); ColumnFilters get enabled => $composableBuilder( column: $table.enabled, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastExecutedAt => $composableBuilder( column: $table.lastExecutedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get mediaIndex => $composableBuilder( column: $table.mediaIndex, builder: (column) => ColumnFilters(column), ); ColumnFilters get downloadFilter => $composableBuilder( column: $table.downloadFilter, builder: (column) => ColumnFilters(column), ); } class $$SyncRulesTableOrderingComposer extends Composer<_$AppDatabase, $SyncRulesTable> { $$SyncRulesTableOrderingComposer({ 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 profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get serverId => $composableBuilder( column: $table.serverId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get ratingKey => $composableBuilder( column: $table.ratingKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get globalKey => $composableBuilder( column: $table.globalKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get targetType => $composableBuilder( column: $table.targetType, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get episodeCount => $composableBuilder( column: $table.episodeCount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get enabled => $composableBuilder( column: $table.enabled, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastExecutedAt => $composableBuilder( column: $table.lastExecutedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get mediaIndex => $composableBuilder( column: $table.mediaIndex, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get downloadFilter => $composableBuilder( column: $table.downloadFilter, builder: (column) => ColumnOrderings(column), ); } class $$SyncRulesTableAnnotationComposer extends Composer<_$AppDatabase, $SyncRulesTable> { $$SyncRulesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get profileId => $composableBuilder(column: $table.profileId, builder: (column) => column); GeneratedColumn get serverId => $composableBuilder(column: $table.serverId, builder: (column) => column); GeneratedColumn get ratingKey => $composableBuilder(column: $table.ratingKey, builder: (column) => column); GeneratedColumn get globalKey => $composableBuilder(column: $table.globalKey, builder: (column) => column); GeneratedColumn get targetType => $composableBuilder( column: $table.targetType, builder: (column) => column, ); GeneratedColumn get episodeCount => $composableBuilder( column: $table.episodeCount, builder: (column) => column, ); GeneratedColumn get enabled => $composableBuilder(column: $table.enabled, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get lastExecutedAt => $composableBuilder( column: $table.lastExecutedAt, builder: (column) => column, ); GeneratedColumn get mediaIndex => $composableBuilder( column: $table.mediaIndex, builder: (column) => column, ); GeneratedColumn get downloadFilter => $composableBuilder( column: $table.downloadFilter, builder: (column) => column, ); } class $$SyncRulesTableTableManager extends RootTableManager< _$AppDatabase, $SyncRulesTable, SyncRuleItem, $$SyncRulesTableFilterComposer, $$SyncRulesTableOrderingComposer, $$SyncRulesTableAnnotationComposer, $$SyncRulesTableCreateCompanionBuilder, $$SyncRulesTableUpdateCompanionBuilder, ( SyncRuleItem, BaseReferences<_$AppDatabase, $SyncRulesTable, SyncRuleItem>, ), SyncRuleItem, PrefetchHooks Function() > { $$SyncRulesTableTableManager(_$AppDatabase db, $SyncRulesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SyncRulesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SyncRulesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SyncRulesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value profileId = const Value.absent(), Value serverId = const Value.absent(), Value ratingKey = const Value.absent(), Value globalKey = const Value.absent(), Value targetType = const Value.absent(), Value episodeCount = const Value.absent(), Value enabled = const Value.absent(), Value createdAt = const Value.absent(), Value lastExecutedAt = const Value.absent(), Value mediaIndex = const Value.absent(), Value downloadFilter = const Value.absent(), }) => SyncRulesCompanion( id: id, profileId: profileId, serverId: serverId, ratingKey: ratingKey, globalKey: globalKey, targetType: targetType, episodeCount: episodeCount, enabled: enabled, createdAt: createdAt, lastExecutedAt: lastExecutedAt, mediaIndex: mediaIndex, downloadFilter: downloadFilter, ), createCompanionCallback: ({ Value id = const Value.absent(), Value profileId = const Value.absent(), required String serverId, required String ratingKey, required String globalKey, required String targetType, required int episodeCount, Value enabled = const Value.absent(), required int createdAt, Value lastExecutedAt = const Value.absent(), Value mediaIndex = const Value.absent(), Value downloadFilter = const Value.absent(), }) => SyncRulesCompanion.insert( id: id, profileId: profileId, serverId: serverId, ratingKey: ratingKey, globalKey: globalKey, targetType: targetType, episodeCount: episodeCount, enabled: enabled, createdAt: createdAt, lastExecutedAt: lastExecutedAt, mediaIndex: mediaIndex, downloadFilter: downloadFilter, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$SyncRulesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $SyncRulesTable, SyncRuleItem, $$SyncRulesTableFilterComposer, $$SyncRulesTableOrderingComposer, $$SyncRulesTableAnnotationComposer, $$SyncRulesTableCreateCompanionBuilder, $$SyncRulesTableUpdateCompanionBuilder, ( SyncRuleItem, BaseReferences<_$AppDatabase, $SyncRulesTable, SyncRuleItem>, ), SyncRuleItem, PrefetchHooks Function() >; typedef $$ConnectionsTableCreateCompanionBuilder = ConnectionsCompanion Function({ required String id, required String kind, required String displayName, required String configJson, Value isDefault, required int createdAt, Value lastAuthenticatedAt, Value rowid, }); typedef $$ConnectionsTableUpdateCompanionBuilder = ConnectionsCompanion Function({ Value id, Value kind, Value displayName, Value configJson, Value isDefault, Value createdAt, Value lastAuthenticatedAt, Value rowid, }); final class $$ConnectionsTableReferences extends BaseReferences<_$AppDatabase, $ConnectionsTable, ConnectionRow> { $$ConnectionsTableReferences(super.$_db, super.$_table, super.$_typedResult); static MultiTypedResultKey< $ProfileConnectionsTable, List > _profileConnectionsRefsTable(_$AppDatabase db) => MultiTypedResultKey.fromTable( db.profileConnections, aliasName: $_aliasNameGenerator( db.connections.id, db.profileConnections.connectionId, ), ); $$ProfileConnectionsTableProcessedTableManager get profileConnectionsRefs { final manager = $$ProfileConnectionsTableTableManager( $_db, $_db.profileConnections, ).filter((f) => f.connectionId.id.sqlEquals($_itemColumn('id')!)); final cache = $_typedResult.readTableOrNull( _profileConnectionsRefsTable($_db), ); return ProcessedTableManager( manager.$state.copyWith(prefetchedData: cache), ); } } class $$ConnectionsTableFilterComposer extends Composer<_$AppDatabase, $ConnectionsTable> { $$ConnectionsTableFilterComposer({ 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 kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnFilters(column), ); ColumnFilters get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnFilters(column), ); ColumnFilters get configJson => $composableBuilder( column: $table.configJson, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDefault => $composableBuilder( column: $table.isDefault, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthenticatedAt => $composableBuilder( column: $table.lastAuthenticatedAt, builder: (column) => ColumnFilters(column), ); Expression profileConnectionsRefs( Expression Function($$ProfileConnectionsTableFilterComposer f) f, ) { final $$ProfileConnectionsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.profileConnections, getReferencedColumn: (t) => t.connectionId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$ProfileConnectionsTableFilterComposer( $db: $db, $table: $db.profileConnections, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } } class $$ConnectionsTableOrderingComposer extends Composer<_$AppDatabase, $ConnectionsTable> { $$ConnectionsTableOrderingComposer({ 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 kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get configJson => $composableBuilder( column: $table.configJson, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDefault => $composableBuilder( column: $table.isDefault, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthenticatedAt => $composableBuilder( column: $table.lastAuthenticatedAt, builder: (column) => ColumnOrderings(column), ); } class $$ConnectionsTableAnnotationComposer extends Composer<_$AppDatabase, $ConnectionsTable> { $$ConnectionsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get kind => $composableBuilder(column: $table.kind, builder: (column) => column); GeneratedColumn get displayName => $composableBuilder( column: $table.displayName, builder: (column) => column, ); GeneratedColumn get configJson => $composableBuilder( column: $table.configJson, builder: (column) => column, ); GeneratedColumn get isDefault => $composableBuilder(column: $table.isDefault, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get lastAuthenticatedAt => $composableBuilder( column: $table.lastAuthenticatedAt, builder: (column) => column, ); Expression profileConnectionsRefs( Expression Function($$ProfileConnectionsTableAnnotationComposer a) f, ) { final $$ProfileConnectionsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.id, referencedTable: $db.profileConnections, getReferencedColumn: (t) => t.connectionId, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$ProfileConnectionsTableAnnotationComposer( $db: $db, $table: $db.profileConnections, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return f(composer); } } class $$ConnectionsTableTableManager extends RootTableManager< _$AppDatabase, $ConnectionsTable, ConnectionRow, $$ConnectionsTableFilterComposer, $$ConnectionsTableOrderingComposer, $$ConnectionsTableAnnotationComposer, $$ConnectionsTableCreateCompanionBuilder, $$ConnectionsTableUpdateCompanionBuilder, (ConnectionRow, $$ConnectionsTableReferences), ConnectionRow, PrefetchHooks Function({bool profileConnectionsRefs}) > { $$ConnectionsTableTableManager(_$AppDatabase db, $ConnectionsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ConnectionsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ConnectionsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ConnectionsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value kind = const Value.absent(), Value displayName = const Value.absent(), Value configJson = const Value.absent(), Value isDefault = const Value.absent(), Value createdAt = const Value.absent(), Value lastAuthenticatedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ConnectionsCompanion( id: id, kind: kind, displayName: displayName, configJson: configJson, isDefault: isDefault, createdAt: createdAt, lastAuthenticatedAt: lastAuthenticatedAt, rowid: rowid, ), createCompanionCallback: ({ required String id, required String kind, required String displayName, required String configJson, Value isDefault = const Value.absent(), required int createdAt, Value lastAuthenticatedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ConnectionsCompanion.insert( id: id, kind: kind, displayName: displayName, configJson: configJson, isDefault: isDefault, createdAt: createdAt, lastAuthenticatedAt: lastAuthenticatedAt, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => ( e.readTable(table), $$ConnectionsTableReferences(db, table, e), ), ) .toList(), prefetchHooksCallback: ({profileConnectionsRefs = false}) { return PrefetchHooks( db: db, explicitlyWatchedTables: [ if (profileConnectionsRefs) db.profileConnections, ], addJoins: null, getPrefetchedDataCallback: (items) async { return [ if (profileConnectionsRefs) await $_getPrefetchedData< ConnectionRow, $ConnectionsTable, ProfileConnectionRow >( currentTable: table, referencedTable: $$ConnectionsTableReferences ._profileConnectionsRefsTable(db), managerFromTypedResult: (p0) => $$ConnectionsTableReferences( db, table, p0, ).profileConnectionsRefs, referencedItemsForCurrentItem: (item, referencedItems) => referencedItems.where( (e) => e.connectionId == item.id, ), typedResults: items, ), ]; }, ); }, ), ); } typedef $$ConnectionsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ConnectionsTable, ConnectionRow, $$ConnectionsTableFilterComposer, $$ConnectionsTableOrderingComposer, $$ConnectionsTableAnnotationComposer, $$ConnectionsTableCreateCompanionBuilder, $$ConnectionsTableUpdateCompanionBuilder, (ConnectionRow, $$ConnectionsTableReferences), ConnectionRow, PrefetchHooks Function({bool profileConnectionsRefs}) >; typedef $$ProfilesTableCreateCompanionBuilder = ProfilesCompanion Function({ required String id, required String kind, required String displayName, Value avatarThumbUrl, required String configJson, Value sortOrder, required int createdAt, Value lastUsedAt, Value rowid, }); typedef $$ProfilesTableUpdateCompanionBuilder = ProfilesCompanion Function({ Value id, Value kind, Value displayName, Value avatarThumbUrl, Value configJson, Value sortOrder, Value createdAt, Value lastUsedAt, Value rowid, }); class $$ProfilesTableFilterComposer extends Composer<_$AppDatabase, $ProfilesTable> { $$ProfilesTableFilterComposer({ 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 kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnFilters(column), ); ColumnFilters get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnFilters(column), ); ColumnFilters get avatarThumbUrl => $composableBuilder( column: $table.avatarThumbUrl, builder: (column) => ColumnFilters(column), ); ColumnFilters get configJson => $composableBuilder( column: $table.configJson, builder: (column) => ColumnFilters(column), ); ColumnFilters get sortOrder => $composableBuilder( column: $table.sortOrder, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastUsedAt => $composableBuilder( column: $table.lastUsedAt, builder: (column) => ColumnFilters(column), ); } class $$ProfilesTableOrderingComposer extends Composer<_$AppDatabase, $ProfilesTable> { $$ProfilesTableOrderingComposer({ 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 kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get avatarThumbUrl => $composableBuilder( column: $table.avatarThumbUrl, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get configJson => $composableBuilder( column: $table.configJson, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get sortOrder => $composableBuilder( column: $table.sortOrder, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastUsedAt => $composableBuilder( column: $table.lastUsedAt, builder: (column) => ColumnOrderings(column), ); } class $$ProfilesTableAnnotationComposer extends Composer<_$AppDatabase, $ProfilesTable> { $$ProfilesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get kind => $composableBuilder(column: $table.kind, builder: (column) => column); GeneratedColumn get displayName => $composableBuilder( column: $table.displayName, builder: (column) => column, ); GeneratedColumn get avatarThumbUrl => $composableBuilder( column: $table.avatarThumbUrl, builder: (column) => column, ); GeneratedColumn get configJson => $composableBuilder( column: $table.configJson, builder: (column) => column, ); GeneratedColumn get sortOrder => $composableBuilder(column: $table.sortOrder, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get lastUsedAt => $composableBuilder( column: $table.lastUsedAt, builder: (column) => column, ); } class $$ProfilesTableTableManager extends RootTableManager< _$AppDatabase, $ProfilesTable, ProfileRow, $$ProfilesTableFilterComposer, $$ProfilesTableOrderingComposer, $$ProfilesTableAnnotationComposer, $$ProfilesTableCreateCompanionBuilder, $$ProfilesTableUpdateCompanionBuilder, ( ProfileRow, BaseReferences<_$AppDatabase, $ProfilesTable, ProfileRow>, ), ProfileRow, PrefetchHooks Function() > { $$ProfilesTableTableManager(_$AppDatabase db, $ProfilesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ProfilesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ProfilesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ProfilesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value kind = const Value.absent(), Value displayName = const Value.absent(), Value avatarThumbUrl = const Value.absent(), Value configJson = const Value.absent(), Value sortOrder = const Value.absent(), Value createdAt = const Value.absent(), Value lastUsedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ProfilesCompanion( id: id, kind: kind, displayName: displayName, avatarThumbUrl: avatarThumbUrl, configJson: configJson, sortOrder: sortOrder, createdAt: createdAt, lastUsedAt: lastUsedAt, rowid: rowid, ), createCompanionCallback: ({ required String id, required String kind, required String displayName, Value avatarThumbUrl = const Value.absent(), required String configJson, Value sortOrder = const Value.absent(), required int createdAt, Value lastUsedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ProfilesCompanion.insert( id: id, kind: kind, displayName: displayName, avatarThumbUrl: avatarThumbUrl, configJson: configJson, sortOrder: sortOrder, createdAt: createdAt, lastUsedAt: lastUsedAt, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$ProfilesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ProfilesTable, ProfileRow, $$ProfilesTableFilterComposer, $$ProfilesTableOrderingComposer, $$ProfilesTableAnnotationComposer, $$ProfilesTableCreateCompanionBuilder, $$ProfilesTableUpdateCompanionBuilder, (ProfileRow, BaseReferences<_$AppDatabase, $ProfilesTable, ProfileRow>), ProfileRow, PrefetchHooks Function() >; typedef $$ProfileConnectionsTableCreateCompanionBuilder = ProfileConnectionsCompanion Function({ required String profileId, required String connectionId, Value userToken, required String userIdentifier, Value isDefault, Value tokenAcquiredAt, Value lastUsedAt, Value rowid, }); typedef $$ProfileConnectionsTableUpdateCompanionBuilder = ProfileConnectionsCompanion Function({ Value profileId, Value connectionId, Value userToken, Value userIdentifier, Value isDefault, Value tokenAcquiredAt, Value lastUsedAt, Value rowid, }); final class $$ProfileConnectionsTableReferences extends BaseReferences< _$AppDatabase, $ProfileConnectionsTable, ProfileConnectionRow > { $$ProfileConnectionsTableReferences( super.$_db, super.$_table, super.$_typedResult, ); static $ConnectionsTable _connectionIdTable(_$AppDatabase db) => db.connections.createAlias( $_aliasNameGenerator( db.profileConnections.connectionId, db.connections.id, ), ); $$ConnectionsTableProcessedTableManager get connectionId { final $_column = $_itemColumn('connection_id')!; final manager = $$ConnectionsTableTableManager( $_db, $_db.connections, ).filter((f) => f.id.sqlEquals($_column)); final item = $_typedResult.readTableOrNull(_connectionIdTable($_db)); if (item == null) return manager; return ProcessedTableManager( manager.$state.copyWith(prefetchedData: [item]), ); } } class $$ProfileConnectionsTableFilterComposer extends Composer<_$AppDatabase, $ProfileConnectionsTable> { $$ProfileConnectionsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnFilters(column), ); ColumnFilters get userToken => $composableBuilder( column: $table.userToken, builder: (column) => ColumnFilters(column), ); ColumnFilters get userIdentifier => $composableBuilder( column: $table.userIdentifier, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDefault => $composableBuilder( column: $table.isDefault, builder: (column) => ColumnFilters(column), ); ColumnFilters get tokenAcquiredAt => $composableBuilder( column: $table.tokenAcquiredAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastUsedAt => $composableBuilder( column: $table.lastUsedAt, builder: (column) => ColumnFilters(column), ); $$ConnectionsTableFilterComposer get connectionId { final $$ConnectionsTableFilterComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.connectionId, referencedTable: $db.connections, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$ConnectionsTableFilterComposer( $db: $db, $table: $db.connections, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$ProfileConnectionsTableOrderingComposer extends Composer<_$AppDatabase, $ProfileConnectionsTable> { $$ProfileConnectionsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get profileId => $composableBuilder( column: $table.profileId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get userToken => $composableBuilder( column: $table.userToken, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get userIdentifier => $composableBuilder( column: $table.userIdentifier, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDefault => $composableBuilder( column: $table.isDefault, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get tokenAcquiredAt => $composableBuilder( column: $table.tokenAcquiredAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastUsedAt => $composableBuilder( column: $table.lastUsedAt, builder: (column) => ColumnOrderings(column), ); $$ConnectionsTableOrderingComposer get connectionId { final $$ConnectionsTableOrderingComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.connectionId, referencedTable: $db.connections, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$ConnectionsTableOrderingComposer( $db: $db, $table: $db.connections, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$ProfileConnectionsTableAnnotationComposer extends Composer<_$AppDatabase, $ProfileConnectionsTable> { $$ProfileConnectionsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get profileId => $composableBuilder(column: $table.profileId, builder: (column) => column); GeneratedColumn get userToken => $composableBuilder(column: $table.userToken, builder: (column) => column); GeneratedColumn get userIdentifier => $composableBuilder( column: $table.userIdentifier, builder: (column) => column, ); GeneratedColumn get isDefault => $composableBuilder(column: $table.isDefault, builder: (column) => column); GeneratedColumn get tokenAcquiredAt => $composableBuilder( column: $table.tokenAcquiredAt, builder: (column) => column, ); GeneratedColumn get lastUsedAt => $composableBuilder( column: $table.lastUsedAt, builder: (column) => column, ); $$ConnectionsTableAnnotationComposer get connectionId { final $$ConnectionsTableAnnotationComposer composer = $composerBuilder( composer: this, getCurrentColumn: (t) => t.connectionId, referencedTable: $db.connections, getReferencedColumn: (t) => t.id, builder: ( joinBuilder, { $addJoinBuilderToRootComposer, $removeJoinBuilderFromRootComposer, }) => $$ConnectionsTableAnnotationComposer( $db: $db, $table: $db.connections, $addJoinBuilderToRootComposer: $addJoinBuilderToRootComposer, joinBuilder: joinBuilder, $removeJoinBuilderFromRootComposer: $removeJoinBuilderFromRootComposer, ), ); return composer; } } class $$ProfileConnectionsTableTableManager extends RootTableManager< _$AppDatabase, $ProfileConnectionsTable, ProfileConnectionRow, $$ProfileConnectionsTableFilterComposer, $$ProfileConnectionsTableOrderingComposer, $$ProfileConnectionsTableAnnotationComposer, $$ProfileConnectionsTableCreateCompanionBuilder, $$ProfileConnectionsTableUpdateCompanionBuilder, (ProfileConnectionRow, $$ProfileConnectionsTableReferences), ProfileConnectionRow, PrefetchHooks Function({bool connectionId}) > { $$ProfileConnectionsTableTableManager( _$AppDatabase db, $ProfileConnectionsTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ProfileConnectionsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ProfileConnectionsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ProfileConnectionsTableAnnotationComposer( $db: db, $table: table, ), updateCompanionCallback: ({ Value profileId = const Value.absent(), Value connectionId = const Value.absent(), Value userToken = const Value.absent(), Value userIdentifier = const Value.absent(), Value isDefault = const Value.absent(), Value tokenAcquiredAt = const Value.absent(), Value lastUsedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ProfileConnectionsCompanion( profileId: profileId, connectionId: connectionId, userToken: userToken, userIdentifier: userIdentifier, isDefault: isDefault, tokenAcquiredAt: tokenAcquiredAt, lastUsedAt: lastUsedAt, rowid: rowid, ), createCompanionCallback: ({ required String profileId, required String connectionId, Value userToken = const Value.absent(), required String userIdentifier, Value isDefault = const Value.absent(), Value tokenAcquiredAt = const Value.absent(), Value lastUsedAt = const Value.absent(), Value rowid = const Value.absent(), }) => ProfileConnectionsCompanion.insert( profileId: profileId, connectionId: connectionId, userToken: userToken, userIdentifier: userIdentifier, isDefault: isDefault, tokenAcquiredAt: tokenAcquiredAt, lastUsedAt: lastUsedAt, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map( (e) => ( e.readTable(table), $$ProfileConnectionsTableReferences(db, table, e), ), ) .toList(), prefetchHooksCallback: ({connectionId = false}) { return PrefetchHooks( db: db, explicitlyWatchedTables: [], addJoins: < T extends TableManagerState< dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic, dynamic > >(state) { if (connectionId) { state = state.withJoin( currentTable: table, currentColumn: table.connectionId, referencedTable: $$ProfileConnectionsTableReferences ._connectionIdTable(db), referencedColumn: $$ProfileConnectionsTableReferences ._connectionIdTable(db) .id, ) as T; } return state; }, getPrefetchedDataCallback: (items) async { return []; }, ); }, ), ); } typedef $$ProfileConnectionsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ProfileConnectionsTable, ProfileConnectionRow, $$ProfileConnectionsTableFilterComposer, $$ProfileConnectionsTableOrderingComposer, $$ProfileConnectionsTableAnnotationComposer, $$ProfileConnectionsTableCreateCompanionBuilder, $$ProfileConnectionsTableUpdateCompanionBuilder, (ProfileConnectionRow, $$ProfileConnectionsTableReferences), ProfileConnectionRow, PrefetchHooks Function({bool connectionId}) >; class $AppDatabaseManager { final _$AppDatabase _db; $AppDatabaseManager(this._db); $$DownloadedMediaTableTableManager get downloadedMedia => $$DownloadedMediaTableTableManager(_db, _db.downloadedMedia); $$DownloadOwnersTableTableManager get downloadOwners => $$DownloadOwnersTableTableManager(_db, _db.downloadOwners); $$DownloadQueueTableTableManager get downloadQueue => $$DownloadQueueTableTableManager(_db, _db.downloadQueue); $$ApiCacheTableTableManager get apiCache => $$ApiCacheTableTableManager(_db, _db.apiCache); $$OfflineWatchProgressTableTableManager get offlineWatchProgress => $$OfflineWatchProgressTableTableManager(_db, _db.offlineWatchProgress); $$SyncRulesTableTableManager get syncRules => $$SyncRulesTableTableManager(_db, _db.syncRules); $$ConnectionsTableTableManager get connections => $$ConnectionsTableTableManager(_db, _db.connections); $$ProfilesTableTableManager get profiles => $$ProfilesTableTableManager(_db, _db.profiles); $$ProfileConnectionsTableTableManager get profileConnections => $$ProfileConnectionsTableTableManager(_db, _db.profileConnections); }