Merge branch 'main' into patch-1
commit
77ce8105cb
|
|
@ -18,6 +18,7 @@ For the full list, refer to the [Immich source code](https://github.com/immich-a
|
|||
| `JPEG 2000` | `.jp2` | :white_check_mark: | |
|
||||
| `JPEG` | `.jpeg` `.jpg` `.jpe` `.insp` | :white_check_mark: | |
|
||||
| `JPEG XL` | `.jxl` | :white_check_mark: | |
|
||||
| `MPO` | `.mpo` | :white_check_mark: | Multi-Picture |
|
||||
| `PNG` | `.png` | :white_check_mark: | |
|
||||
| `PSD` | `.psd` | :white_check_mark: | Adobe Photoshop |
|
||||
| `RAW` | `.raw` | :white_check_mark: | |
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@ export const setupBaseMockApiRoutes = async (context: BrowserContext, adminUserI
|
|||
'.jp2',
|
||||
'.jpe',
|
||||
'.jxl',
|
||||
'.mpo',
|
||||
'.svg',
|
||||
'.tif',
|
||||
'.tiff',
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"dart.flutterSdkPath": ".fvm/versions/3.41.6",
|
||||
"dart.flutterSdkPath": ".fvm/versions/3.41.7",
|
||||
"dart.lineLength": 120,
|
||||
"[dart]": {
|
||||
"editor.rulers": [
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ data class PlatformAsset (
|
|||
val updatedAt: Long? = null,
|
||||
val width: Long? = null,
|
||||
val height: Long? = null,
|
||||
val durationInSeconds: Long,
|
||||
val durationMs: Long,
|
||||
val orientation: Long,
|
||||
val isFavorite: Boolean,
|
||||
val adjustmentTime: Long? = null,
|
||||
|
|
@ -234,14 +234,14 @@ data class PlatformAsset (
|
|||
val updatedAt = pigeonVar_list[4] as Long?
|
||||
val width = pigeonVar_list[5] as Long?
|
||||
val height = pigeonVar_list[6] as Long?
|
||||
val durationInSeconds = pigeonVar_list[7] as Long
|
||||
val durationMs = pigeonVar_list[7] as Long
|
||||
val orientation = pigeonVar_list[8] as Long
|
||||
val isFavorite = pigeonVar_list[9] as Boolean
|
||||
val adjustmentTime = pigeonVar_list[10] as Long?
|
||||
val latitude = pigeonVar_list[11] as Double?
|
||||
val longitude = pigeonVar_list[12] as Double?
|
||||
val playbackStyle = pigeonVar_list[13] as PlatformAssetPlaybackStyle
|
||||
return PlatformAsset(id, name, type, createdAt, updatedAt, width, height, durationInSeconds, orientation, isFavorite, adjustmentTime, latitude, longitude, playbackStyle)
|
||||
return PlatformAsset(id, name, type, createdAt, updatedAt, width, height, durationMs, orientation, isFavorite, adjustmentTime, latitude, longitude, playbackStyle)
|
||||
}
|
||||
}
|
||||
fun toList(): List<Any?> {
|
||||
|
|
@ -253,7 +253,7 @@ data class PlatformAsset (
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
orientation,
|
||||
isFavorite,
|
||||
adjustmentTime,
|
||||
|
|
@ -270,7 +270,7 @@ data class PlatformAsset (
|
|||
return true
|
||||
}
|
||||
val other = other as PlatformAsset
|
||||
return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.type, other.type) && MessagesPigeonUtils.deepEquals(this.createdAt, other.createdAt) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.width, other.width) && MessagesPigeonUtils.deepEquals(this.height, other.height) && MessagesPigeonUtils.deepEquals(this.durationInSeconds, other.durationInSeconds) && MessagesPigeonUtils.deepEquals(this.orientation, other.orientation) && MessagesPigeonUtils.deepEquals(this.isFavorite, other.isFavorite) && MessagesPigeonUtils.deepEquals(this.adjustmentTime, other.adjustmentTime) && MessagesPigeonUtils.deepEquals(this.latitude, other.latitude) && MessagesPigeonUtils.deepEquals(this.longitude, other.longitude) && MessagesPigeonUtils.deepEquals(this.playbackStyle, other.playbackStyle)
|
||||
return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.type, other.type) && MessagesPigeonUtils.deepEquals(this.createdAt, other.createdAt) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.width, other.width) && MessagesPigeonUtils.deepEquals(this.height, other.height) && MessagesPigeonUtils.deepEquals(this.durationMs, other.durationMs) && MessagesPigeonUtils.deepEquals(this.orientation, other.orientation) && MessagesPigeonUtils.deepEquals(this.isFavorite, other.isFavorite) && MessagesPigeonUtils.deepEquals(this.adjustmentTime, other.adjustmentTime) && MessagesPigeonUtils.deepEquals(this.latitude, other.latitude) && MessagesPigeonUtils.deepEquals(this.longitude, other.longitude) && MessagesPigeonUtils.deepEquals(this.playbackStyle, other.playbackStyle)
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
|
|
@ -282,7 +282,7 @@ data class PlatformAsset (
|
|||
result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt)
|
||||
result = 31 * result + MessagesPigeonUtils.deepHash(this.width)
|
||||
result = 31 * result + MessagesPigeonUtils.deepHash(this.height)
|
||||
result = 31 * result + MessagesPigeonUtils.deepHash(this.durationInSeconds)
|
||||
result = 31 * result + MessagesPigeonUtils.deepHash(this.durationMs)
|
||||
result = 31 * result + MessagesPigeonUtils.deepHash(this.orientation)
|
||||
result = 31 * result + MessagesPigeonUtils.deepHash(this.isFavorite)
|
||||
result = 31 * result + MessagesPigeonUtils.deepHash(this.adjustmentTime)
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin() {
|
|||
val height = c.getInt(heightColumn).toLong()
|
||||
// Duration is milliseconds
|
||||
val duration = if (rawMediaType == MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE) 0L
|
||||
else c.getLong(durationColumn) / 1000
|
||||
else c.getLong(durationColumn)
|
||||
val orientation = c.getInt(orientationColumn)
|
||||
val isFavorite = if (favoriteColumn == -1) false else c.getInt(favoriteColumn) != 0
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,7 @@
|
|||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 77;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ struct PlatformAsset: Hashable {
|
|||
var updatedAt: Int64? = nil
|
||||
var width: Int64? = nil
|
||||
var height: Int64? = nil
|
||||
var durationInSeconds: Int64
|
||||
var durationMs: Int64
|
||||
var orientation: Int64
|
||||
var isFavorite: Bool
|
||||
var adjustmentTime: Int64? = nil
|
||||
|
|
@ -210,7 +210,7 @@ struct PlatformAsset: Hashable {
|
|||
let updatedAt: Int64? = nilOrValue(pigeonVar_list[4])
|
||||
let width: Int64? = nilOrValue(pigeonVar_list[5])
|
||||
let height: Int64? = nilOrValue(pigeonVar_list[6])
|
||||
let durationInSeconds = pigeonVar_list[7] as! Int64
|
||||
let durationMs = pigeonVar_list[7] as! Int64
|
||||
let orientation = pigeonVar_list[8] as! Int64
|
||||
let isFavorite = pigeonVar_list[9] as! Bool
|
||||
let adjustmentTime: Int64? = nilOrValue(pigeonVar_list[10])
|
||||
|
|
@ -226,7 +226,7 @@ struct PlatformAsset: Hashable {
|
|||
updatedAt: updatedAt,
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
orientation: orientation,
|
||||
isFavorite: isFavorite,
|
||||
adjustmentTime: adjustmentTime,
|
||||
|
|
@ -244,7 +244,7 @@ struct PlatformAsset: Hashable {
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
orientation,
|
||||
isFavorite,
|
||||
adjustmentTime,
|
||||
|
|
@ -257,7 +257,7 @@ struct PlatformAsset: Hashable {
|
|||
if Swift.type(of: lhs) != Swift.type(of: rhs) {
|
||||
return false
|
||||
}
|
||||
return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.type, rhs.type) && deepEqualsMessages(lhs.createdAt, rhs.createdAt) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.width, rhs.width) && deepEqualsMessages(lhs.height, rhs.height) && deepEqualsMessages(lhs.durationInSeconds, rhs.durationInSeconds) && deepEqualsMessages(lhs.orientation, rhs.orientation) && deepEqualsMessages(lhs.isFavorite, rhs.isFavorite) && deepEqualsMessages(lhs.adjustmentTime, rhs.adjustmentTime) && deepEqualsMessages(lhs.latitude, rhs.latitude) && deepEqualsMessages(lhs.longitude, rhs.longitude) && deepEqualsMessages(lhs.playbackStyle, rhs.playbackStyle)
|
||||
return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.type, rhs.type) && deepEqualsMessages(lhs.createdAt, rhs.createdAt) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.width, rhs.width) && deepEqualsMessages(lhs.height, rhs.height) && deepEqualsMessages(lhs.durationMs, rhs.durationMs) && deepEqualsMessages(lhs.orientation, rhs.orientation) && deepEqualsMessages(lhs.isFavorite, rhs.isFavorite) && deepEqualsMessages(lhs.adjustmentTime, rhs.adjustmentTime) && deepEqualsMessages(lhs.latitude, rhs.latitude) && deepEqualsMessages(lhs.longitude, rhs.longitude) && deepEqualsMessages(lhs.playbackStyle, rhs.playbackStyle)
|
||||
}
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
|
|
@ -269,7 +269,7 @@ struct PlatformAsset: Hashable {
|
|||
deepHashMessages(value: updatedAt, hasher: &hasher)
|
||||
deepHashMessages(value: width, hasher: &hasher)
|
||||
deepHashMessages(value: height, hasher: &hasher)
|
||||
deepHashMessages(value: durationInSeconds, hasher: &hasher)
|
||||
deepHashMessages(value: durationMs, hasher: &hasher)
|
||||
deepHashMessages(value: orientation, hasher: &hasher)
|
||||
deepHashMessages(value: isFavorite, hasher: &hasher)
|
||||
deepHashMessages(value: adjustmentTime, hasher: &hasher)
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin {
|
|||
id: asset.localIdentifier,
|
||||
name: "",
|
||||
type: 0,
|
||||
durationInSeconds: 0,
|
||||
durationMs: 0,
|
||||
orientation: 0,
|
||||
isFavorite: false,
|
||||
playbackStyle: .unknown
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ extension PHAsset {
|
|||
updatedAt: modificationDate.map { Int64($0.timeIntervalSince1970) },
|
||||
width: Int64(pixelWidth),
|
||||
height: Int64(pixelHeight),
|
||||
durationInSeconds: Int64(duration),
|
||||
durationMs: Int64(duration * 1000),
|
||||
orientation: 0,
|
||||
isFavorite: isFavorite,
|
||||
adjustmentTime: adjustmentTimestamp,
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ sealed class BaseAsset {
|
|||
final DateTime updatedAt;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final int? durationInSeconds;
|
||||
final int? durationMs;
|
||||
final bool isFavorite;
|
||||
final String? livePhotoVideoId;
|
||||
final bool isEdited;
|
||||
|
|
@ -38,7 +38,7 @@ sealed class BaseAsset {
|
|||
required this.updatedAt,
|
||||
this.width,
|
||||
this.height,
|
||||
this.durationInSeconds,
|
||||
this.durationMs,
|
||||
this.isFavorite = false,
|
||||
this.livePhotoVideoId,
|
||||
required this.isEdited,
|
||||
|
|
@ -53,15 +53,17 @@ sealed class BaseAsset {
|
|||
AssetPlaybackStyle get playbackStyle {
|
||||
if (isVideo) return AssetPlaybackStyle.video;
|
||||
if (isMotionPhoto) return AssetPlaybackStyle.livePhoto;
|
||||
if (isImage && durationInSeconds != null && durationInSeconds! > 0) return AssetPlaybackStyle.imageAnimated;
|
||||
if (isImage && durationMs != null && durationMs! > 0) {
|
||||
return AssetPlaybackStyle.imageAnimated;
|
||||
}
|
||||
if (isImage) return AssetPlaybackStyle.image;
|
||||
return AssetPlaybackStyle.unknown;
|
||||
}
|
||||
|
||||
Duration get duration {
|
||||
final durationInSeconds = this.durationInSeconds;
|
||||
if (durationInSeconds != null) {
|
||||
return Duration(seconds: durationInSeconds);
|
||||
final durationMs = this.durationMs;
|
||||
if (durationMs != null) {
|
||||
return Duration(milliseconds: durationMs);
|
||||
}
|
||||
return const Duration();
|
||||
}
|
||||
|
|
@ -88,7 +90,7 @@ sealed class BaseAsset {
|
|||
updatedAt: $updatedAt,
|
||||
width: ${width ?? "<NA>"},
|
||||
height: ${height ?? "<NA>"},
|
||||
durationInSeconds: ${durationInSeconds ?? "<NA>"},
|
||||
durationMs: ${durationMs ?? "<NA>"},
|
||||
isFavorite: $isFavorite,
|
||||
isEdited: $isEdited,
|
||||
}''';
|
||||
|
|
@ -104,7 +106,7 @@ sealed class BaseAsset {
|
|||
updatedAt == other.updatedAt &&
|
||||
width == other.width &&
|
||||
height == other.height &&
|
||||
durationInSeconds == other.durationInSeconds &&
|
||||
durationMs == other.durationMs &&
|
||||
isFavorite == other.isFavorite &&
|
||||
isEdited == other.isEdited;
|
||||
}
|
||||
|
|
@ -119,7 +121,7 @@ sealed class BaseAsset {
|
|||
updatedAt.hashCode ^
|
||||
width.hashCode ^
|
||||
height.hashCode ^
|
||||
durationInSeconds.hashCode ^
|
||||
durationMs.hashCode ^
|
||||
isFavorite.hashCode ^
|
||||
isEdited.hashCode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class LocalAsset extends BaseAsset {
|
|||
required super.updatedAt,
|
||||
super.width,
|
||||
super.height,
|
||||
super.durationInSeconds,
|
||||
super.durationMs,
|
||||
super.isFavorite = false,
|
||||
super.livePhotoVideoId,
|
||||
this.orientation = 0,
|
||||
|
|
@ -58,7 +58,7 @@ class LocalAsset extends BaseAsset {
|
|||
updatedAt: $updatedAt,
|
||||
width: ${width ?? "<NA>"},
|
||||
height: ${height ?? "<NA>"},
|
||||
durationInSeconds: ${durationInSeconds ?? "<NA>"},
|
||||
durationMs: ${durationMs ?? "<NA>"},
|
||||
playbackStyle: $playbackStyle,
|
||||
remoteId: ${remoteId ?? "<NA>"},
|
||||
cloudId: ${cloudId ?? "<NA>"},
|
||||
|
|
@ -108,7 +108,7 @@ class LocalAsset extends BaseAsset {
|
|||
DateTime? updatedAt,
|
||||
int? width,
|
||||
int? height,
|
||||
int? durationInSeconds,
|
||||
int? durationMs,
|
||||
bool? isFavorite,
|
||||
int? orientation,
|
||||
AssetPlaybackStyle? playbackStyle,
|
||||
|
|
@ -128,7 +128,7 @@ class LocalAsset extends BaseAsset {
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
durationInSeconds: durationInSeconds ?? this.durationInSeconds,
|
||||
durationMs: durationMs ?? this.durationMs,
|
||||
isFavorite: isFavorite ?? this.isFavorite,
|
||||
orientation: orientation ?? this.orientation,
|
||||
playbackStyle: playbackStyle ?? this.playbackStyle,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class RemoteAsset extends BaseAsset {
|
|||
required super.updatedAt,
|
||||
super.width,
|
||||
super.height,
|
||||
super.durationInSeconds,
|
||||
super.durationMs,
|
||||
super.isFavorite = false,
|
||||
this.thumbHash,
|
||||
this.visibility = AssetVisibility.timeline,
|
||||
|
|
@ -57,7 +57,7 @@ class RemoteAsset extends BaseAsset {
|
|||
updatedAt: $updatedAt,
|
||||
width: ${width ?? "<NA>"},
|
||||
height: ${height ?? "<NA>"},
|
||||
durationInSeconds: ${durationInSeconds ?? "<NA>"},
|
||||
durationMs: ${durationMs ?? "<NA>"},
|
||||
localId: ${localId ?? "<NA>"},
|
||||
isFavorite: $isFavorite,
|
||||
thumbHash: ${thumbHash ?? "<NA>"},
|
||||
|
|
@ -102,7 +102,7 @@ class RemoteAsset extends BaseAsset {
|
|||
DateTime? updatedAt,
|
||||
int? width,
|
||||
int? height,
|
||||
int? durationInSeconds,
|
||||
int? durationMs,
|
||||
bool? isFavorite,
|
||||
String? thumbHash,
|
||||
AssetVisibility? visibility,
|
||||
|
|
@ -121,7 +121,7 @@ class RemoteAsset extends BaseAsset {
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
durationInSeconds: durationInSeconds ?? this.durationInSeconds,
|
||||
durationMs: durationMs ?? this.durationMs,
|
||||
isFavorite: isFavorite ?? this.isFavorite,
|
||||
thumbHash: thumbHash ?? this.thumbHash,
|
||||
visibility: visibility ?? this.visibility,
|
||||
|
|
@ -146,7 +146,7 @@ class RemoteAssetExif extends RemoteAsset {
|
|||
required super.updatedAt,
|
||||
super.width,
|
||||
super.height,
|
||||
super.durationInSeconds,
|
||||
super.durationMs,
|
||||
super.isFavorite = false,
|
||||
super.thumbHash,
|
||||
super.visibility = AssetVisibility.timeline,
|
||||
|
|
@ -178,7 +178,7 @@ class RemoteAssetExif extends RemoteAsset {
|
|||
DateTime? updatedAt,
|
||||
int? width,
|
||||
int? height,
|
||||
int? durationInSeconds,
|
||||
int? durationMs,
|
||||
bool? isFavorite,
|
||||
String? thumbHash,
|
||||
AssetVisibility? visibility,
|
||||
|
|
@ -198,7 +198,7 @@ class RemoteAssetExif extends RemoteAsset {
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
durationInSeconds: durationInSeconds ?? this.durationInSeconds,
|
||||
durationMs: durationMs ?? this.durationMs,
|
||||
isFavorite: isFavorite ?? this.isFavorite,
|
||||
thumbHash: thumbHash ?? this.thumbHash,
|
||||
visibility: visibility ?? this.visibility,
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ class LocalSyncService {
|
|||
a.createdAt.isAtSameMomentAs(b.createdAt) &&
|
||||
a.width == b.width &&
|
||||
a.height == b.height &&
|
||||
a.durationInSeconds == b.durationInSeconds;
|
||||
a.durationMs == b.durationMs;
|
||||
}
|
||||
|
||||
final firstAdjustment = a.adjustmentTime?.millisecondsSinceEpoch ?? 0;
|
||||
|
|
@ -346,7 +346,7 @@ class LocalSyncService {
|
|||
a.createdAt.isAtSameMomentAs(b.createdAt) &&
|
||||
a.width == b.width &&
|
||||
a.height == b.height &&
|
||||
a.durationInSeconds == b.durationInSeconds &&
|
||||
a.durationMs == b.durationMs &&
|
||||
a.latitude == b.latitude &&
|
||||
a.longitude == b.longitude;
|
||||
}
|
||||
|
|
@ -432,7 +432,7 @@ extension PlatformToLocalAsset on PlatformAsset {
|
|||
updatedAt: tryFromSecondsSinceEpoch(updatedAt, isUtc: true) ?? DateTime.timestamp(),
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
isFavorite: isFavorite,
|
||||
orientation: orientation,
|
||||
playbackStyle: _toPlaybackStyle(playbackStyle),
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ extension DTOToAsset on api.AssetResponseDto {
|
|||
updatedAt: updatedAt,
|
||||
ownerId: ownerId,
|
||||
visibility: visibility.toAssetVisibility(),
|
||||
durationInSeconds: duration?.toDuration()?.inSeconds ?? 0,
|
||||
durationMs: duration?.toDuration()?.inMilliseconds ?? 0,
|
||||
height: height?.toInt(),
|
||||
width: width?.toInt(),
|
||||
isFavorite: isFavorite,
|
||||
|
|
@ -36,7 +36,7 @@ extension DTOToAsset on api.AssetResponseDto {
|
|||
updatedAt: updatedAt,
|
||||
ownerId: ownerId,
|
||||
visibility: visibility.toAssetVisibility(),
|
||||
durationInSeconds: duration?.toDuration()?.inSeconds ?? 0,
|
||||
durationMs: duration?.toDuration()?.inMilliseconds ?? 0,
|
||||
height: height?.toInt(),
|
||||
width: width?.toInt(),
|
||||
isFavorite: isFavorite,
|
||||
|
|
|
|||
|
|
@ -7,11 +7,16 @@ extension StringExtension on String {
|
|||
}
|
||||
|
||||
extension DurationExtension on String {
|
||||
/// Parses and returns the string of format HH:MM:SS as a duration object else null
|
||||
/// Parses and returns the string of format HH:MM:SS.ffffff as a duration object else null
|
||||
Duration? toDuration() {
|
||||
try {
|
||||
final parts = split(':').map((e) => double.parse(e).toInt()).toList(growable: false);
|
||||
return Duration(hours: parts[0], minutes: parts[1], seconds: parts[2]);
|
||||
final parts = split(':');
|
||||
final hours = double.parse(parts[0]).toInt();
|
||||
final minutes = double.parse(parts[1]).toInt();
|
||||
final secondsParts = parts[2].split('.');
|
||||
final seconds = int.parse(secondsParts[0]);
|
||||
final milliseconds = secondsParts.length > 1 ? (double.parse('0.${secondsParts[1]}') * 1000).round() : 0;
|
||||
return Duration(hours: hours, minutes: minutes, seconds: seconds, milliseconds: milliseconds);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ extension LocalAssetEntityDataDomainExtension on LocalAssetEntityData {
|
|||
type: type,
|
||||
createdAt: createdAt,
|
||||
updatedAt: updatedAt,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
isFavorite: isFavorite,
|
||||
height: height,
|
||||
width: width,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ typedef $$LocalAssetEntityTableCreateCompanionBuilder =
|
|||
i0.Value<DateTime> updatedAt,
|
||||
i0.Value<int?> width,
|
||||
i0.Value<int?> height,
|
||||
i0.Value<int?> durationInSeconds,
|
||||
i0.Value<int?> durationMs,
|
||||
required String id,
|
||||
i0.Value<String?> checksum,
|
||||
i0.Value<bool> isFavorite,
|
||||
|
|
@ -35,7 +35,7 @@ typedef $$LocalAssetEntityTableUpdateCompanionBuilder =
|
|||
i0.Value<DateTime> updatedAt,
|
||||
i0.Value<int?> width,
|
||||
i0.Value<int?> height,
|
||||
i0.Value<int?> durationInSeconds,
|
||||
i0.Value<int?> durationMs,
|
||||
i0.Value<String> id,
|
||||
i0.Value<String?> checksum,
|
||||
i0.Value<bool> isFavorite,
|
||||
|
|
@ -87,8 +87,8 @@ class $$LocalAssetEntityTableFilterComposer
|
|||
builder: (column) => i0.ColumnFilters(column),
|
||||
);
|
||||
|
||||
i0.ColumnFilters<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.ColumnFilters<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => i0.ColumnFilters(column),
|
||||
);
|
||||
|
||||
|
|
@ -182,8 +182,8 @@ class $$LocalAssetEntityTableOrderingComposer
|
|||
builder: (column) => i0.ColumnOrderings(column),
|
||||
);
|
||||
|
||||
i0.ColumnOrderings<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.ColumnOrderings<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => i0.ColumnOrderings(column),
|
||||
);
|
||||
|
||||
|
|
@ -260,8 +260,8 @@ class $$LocalAssetEntityTableAnnotationComposer
|
|||
i0.GeneratedColumn<int> get height =>
|
||||
$composableBuilder(column: $table.height, builder: (column) => column);
|
||||
|
||||
i0.GeneratedColumn<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.GeneratedColumn<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => column,
|
||||
);
|
||||
|
||||
|
|
@ -348,7 +348,7 @@ class $$LocalAssetEntityTableTableManager
|
|||
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
i0.Value<String> id = const i0.Value.absent(),
|
||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -366,7 +366,7 @@ class $$LocalAssetEntityTableTableManager
|
|||
updatedAt: updatedAt,
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
id: id,
|
||||
checksum: checksum,
|
||||
isFavorite: isFavorite,
|
||||
|
|
@ -385,7 +385,7 @@ class $$LocalAssetEntityTableTableManager
|
|||
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
required String id,
|
||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -403,7 +403,7 @@ class $$LocalAssetEntityTableTableManager
|
|||
updatedAt: updatedAt,
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
id: id,
|
||||
checksum: checksum,
|
||||
isFavorite: isFavorite,
|
||||
|
|
@ -522,17 +522,17 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const i0.VerificationMeta _durationInSecondsMeta =
|
||||
const i0.VerificationMeta('durationInSeconds');
|
||||
static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta(
|
||||
'durationMs',
|
||||
);
|
||||
@override
|
||||
late final i0.GeneratedColumn<int> durationInSeconds =
|
||||
i0.GeneratedColumn<int>(
|
||||
'duration_in_seconds',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
late final i0.GeneratedColumn<int> durationMs = i0.GeneratedColumn<int>(
|
||||
'duration_ms',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id');
|
||||
@override
|
||||
late final i0.GeneratedColumn<String> id = i0.GeneratedColumn<String>(
|
||||
|
|
@ -645,7 +645,7 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
id,
|
||||
checksum,
|
||||
isFavorite,
|
||||
|
|
@ -700,13 +700,10 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||
height.isAcceptableOrUnknown(data['height']!, _heightMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('duration_in_seconds')) {
|
||||
if (data.containsKey('duration_ms')) {
|
||||
context.handle(
|
||||
_durationInSecondsMeta,
|
||||
durationInSeconds.isAcceptableOrUnknown(
|
||||
data['duration_in_seconds']!,
|
||||
_durationInSecondsMeta,
|
||||
),
|
||||
_durationMsMeta,
|
||||
durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('id')) {
|
||||
|
|
@ -800,9 +797,9 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||
i0.DriftSqlType.int,
|
||||
data['${effectivePrefix}height'],
|
||||
),
|
||||
durationInSeconds: attachedDatabase.typeMapping.read(
|
||||
durationMs: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.int,
|
||||
data['${effectivePrefix}duration_in_seconds'],
|
||||
data['${effectivePrefix}duration_ms'],
|
||||
),
|
||||
id: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.string,
|
||||
|
|
@ -870,7 +867,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
final DateTime updatedAt;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final int? durationInSeconds;
|
||||
final int? durationMs;
|
||||
final String id;
|
||||
final String? checksum;
|
||||
final bool isFavorite;
|
||||
|
|
@ -887,7 +884,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
required this.updatedAt,
|
||||
this.width,
|
||||
this.height,
|
||||
this.durationInSeconds,
|
||||
this.durationMs,
|
||||
required this.id,
|
||||
this.checksum,
|
||||
required this.isFavorite,
|
||||
|
|
@ -915,8 +912,8 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
if (!nullToAbsent || height != null) {
|
||||
map['height'] = i0.Variable<int>(height);
|
||||
}
|
||||
if (!nullToAbsent || durationInSeconds != null) {
|
||||
map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds);
|
||||
if (!nullToAbsent || durationMs != null) {
|
||||
map['duration_ms'] = i0.Variable<int>(durationMs);
|
||||
}
|
||||
map['id'] = i0.Variable<String>(id);
|
||||
if (!nullToAbsent || checksum != null) {
|
||||
|
|
@ -958,7 +955,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
|
||||
width: serializer.fromJson<int?>(json['width']),
|
||||
height: serializer.fromJson<int?>(json['height']),
|
||||
durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),
|
||||
durationMs: serializer.fromJson<int?>(json['durationMs']),
|
||||
id: serializer.fromJson<String>(json['id']),
|
||||
checksum: serializer.fromJson<String?>(json['checksum']),
|
||||
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
|
||||
|
|
@ -984,7 +981,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
'updatedAt': serializer.toJson<DateTime>(updatedAt),
|
||||
'width': serializer.toJson<int?>(width),
|
||||
'height': serializer.toJson<int?>(height),
|
||||
'durationInSeconds': serializer.toJson<int?>(durationInSeconds),
|
||||
'durationMs': serializer.toJson<int?>(durationMs),
|
||||
'id': serializer.toJson<String>(id),
|
||||
'checksum': serializer.toJson<String?>(checksum),
|
||||
'isFavorite': serializer.toJson<bool>(isFavorite),
|
||||
|
|
@ -1006,7 +1003,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
DateTime? updatedAt,
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
String? id,
|
||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||
bool? isFavorite,
|
||||
|
|
@ -1023,9 +1020,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width.present ? width.value : this.width,
|
||||
height: height.present ? height.value : this.height,
|
||||
durationInSeconds: durationInSeconds.present
|
||||
? durationInSeconds.value
|
||||
: this.durationInSeconds,
|
||||
durationMs: durationMs.present ? durationMs.value : this.durationMs,
|
||||
id: id ?? this.id,
|
||||
checksum: checksum.present ? checksum.value : this.checksum,
|
||||
isFavorite: isFavorite ?? this.isFavorite,
|
||||
|
|
@ -1046,9 +1041,9 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
||||
width: data.width.present ? data.width.value : this.width,
|
||||
height: data.height.present ? data.height.value : this.height,
|
||||
durationInSeconds: data.durationInSeconds.present
|
||||
? data.durationInSeconds.value
|
||||
: this.durationInSeconds,
|
||||
durationMs: data.durationMs.present
|
||||
? data.durationMs.value
|
||||
: this.durationMs,
|
||||
id: data.id.present ? data.id.value : this.id,
|
||||
checksum: data.checksum.present ? data.checksum.value : this.checksum,
|
||||
isFavorite: data.isFavorite.present
|
||||
|
|
@ -1078,7 +1073,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
..write('updatedAt: $updatedAt, ')
|
||||
..write('width: $width, ')
|
||||
..write('height: $height, ')
|
||||
..write('durationInSeconds: $durationInSeconds, ')
|
||||
..write('durationMs: $durationMs, ')
|
||||
..write('id: $id, ')
|
||||
..write('checksum: $checksum, ')
|
||||
..write('isFavorite: $isFavorite, ')
|
||||
|
|
@ -1100,7 +1095,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
id,
|
||||
checksum,
|
||||
isFavorite,
|
||||
|
|
@ -1121,7 +1116,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||
other.updatedAt == this.updatedAt &&
|
||||
other.width == this.width &&
|
||||
other.height == this.height &&
|
||||
other.durationInSeconds == this.durationInSeconds &&
|
||||
other.durationMs == this.durationMs &&
|
||||
other.id == this.id &&
|
||||
other.checksum == this.checksum &&
|
||||
other.isFavorite == this.isFavorite &&
|
||||
|
|
@ -1141,7 +1136,7 @@ class LocalAssetEntityCompanion
|
|||
final i0.Value<DateTime> updatedAt;
|
||||
final i0.Value<int?> width;
|
||||
final i0.Value<int?> height;
|
||||
final i0.Value<int?> durationInSeconds;
|
||||
final i0.Value<int?> durationMs;
|
||||
final i0.Value<String> id;
|
||||
final i0.Value<String?> checksum;
|
||||
final i0.Value<bool> isFavorite;
|
||||
|
|
@ -1158,7 +1153,7 @@ class LocalAssetEntityCompanion
|
|||
this.updatedAt = const i0.Value.absent(),
|
||||
this.width = const i0.Value.absent(),
|
||||
this.height = const i0.Value.absent(),
|
||||
this.durationInSeconds = const i0.Value.absent(),
|
||||
this.durationMs = const i0.Value.absent(),
|
||||
this.id = const i0.Value.absent(),
|
||||
this.checksum = const i0.Value.absent(),
|
||||
this.isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -1176,7 +1171,7 @@ class LocalAssetEntityCompanion
|
|||
this.updatedAt = const i0.Value.absent(),
|
||||
this.width = const i0.Value.absent(),
|
||||
this.height = const i0.Value.absent(),
|
||||
this.durationInSeconds = const i0.Value.absent(),
|
||||
this.durationMs = const i0.Value.absent(),
|
||||
required String id,
|
||||
this.checksum = const i0.Value.absent(),
|
||||
this.isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -1196,7 +1191,7 @@ class LocalAssetEntityCompanion
|
|||
i0.Expression<DateTime>? updatedAt,
|
||||
i0.Expression<int>? width,
|
||||
i0.Expression<int>? height,
|
||||
i0.Expression<int>? durationInSeconds,
|
||||
i0.Expression<int>? durationMs,
|
||||
i0.Expression<String>? id,
|
||||
i0.Expression<String>? checksum,
|
||||
i0.Expression<bool>? isFavorite,
|
||||
|
|
@ -1214,7 +1209,7 @@ class LocalAssetEntityCompanion
|
|||
if (updatedAt != null) 'updated_at': updatedAt,
|
||||
if (width != null) 'width': width,
|
||||
if (height != null) 'height': height,
|
||||
if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,
|
||||
if (durationMs != null) 'duration_ms': durationMs,
|
||||
if (id != null) 'id': id,
|
||||
if (checksum != null) 'checksum': checksum,
|
||||
if (isFavorite != null) 'is_favorite': isFavorite,
|
||||
|
|
@ -1234,7 +1229,7 @@ class LocalAssetEntityCompanion
|
|||
i0.Value<DateTime>? updatedAt,
|
||||
i0.Value<int?>? width,
|
||||
i0.Value<int?>? height,
|
||||
i0.Value<int?>? durationInSeconds,
|
||||
i0.Value<int?>? durationMs,
|
||||
i0.Value<String>? id,
|
||||
i0.Value<String?>? checksum,
|
||||
i0.Value<bool>? isFavorite,
|
||||
|
|
@ -1252,7 +1247,7 @@ class LocalAssetEntityCompanion
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
durationInSeconds: durationInSeconds ?? this.durationInSeconds,
|
||||
durationMs: durationMs ?? this.durationMs,
|
||||
id: id ?? this.id,
|
||||
checksum: checksum ?? this.checksum,
|
||||
isFavorite: isFavorite ?? this.isFavorite,
|
||||
|
|
@ -1288,8 +1283,8 @@ class LocalAssetEntityCompanion
|
|||
if (height.present) {
|
||||
map['height'] = i0.Variable<int>(height.value);
|
||||
}
|
||||
if (durationInSeconds.present) {
|
||||
map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds.value);
|
||||
if (durationMs.present) {
|
||||
map['duration_ms'] = i0.Variable<int>(durationMs.value);
|
||||
}
|
||||
if (id.present) {
|
||||
map['id'] = i0.Variable<String>(id.value);
|
||||
|
|
@ -1334,7 +1329,7 @@ class LocalAssetEntityCompanion
|
|||
..write('updatedAt: $updatedAt, ')
|
||||
..write('width: $width, ')
|
||||
..write('height: $height, ')
|
||||
..write('durationInSeconds: $durationInSeconds, ')
|
||||
..write('durationMs: $durationMs, ')
|
||||
..write('id: $id, ')
|
||||
..write('checksum: $checksum, ')
|
||||
..write('isFavorite: $isFavorite, ')
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ SELECT
|
|||
rae.updated_at,
|
||||
rae.width,
|
||||
rae.height,
|
||||
rae.duration_in_seconds,
|
||||
rae.duration_ms,
|
||||
rae.is_favorite,
|
||||
rae.thumb_hash,
|
||||
rae.checksum,
|
||||
|
|
@ -52,7 +52,7 @@ SELECT
|
|||
lae.updated_at,
|
||||
lae.width,
|
||||
lae.height,
|
||||
lae.duration_in_seconds,
|
||||
lae.duration_ms,
|
||||
lae.is_favorite,
|
||||
NULL as thumb_hash,
|
||||
lae.checksum,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
);
|
||||
$arrayStartIndex += generatedlimit.amountOfVariables;
|
||||
return customSelect(
|
||||
'SELECT rae.id AS remote_id, (SELECT lae.id FROM local_asset_entity AS lae WHERE lae.checksum = rae.checksum LIMIT 1) AS local_id, rae.name, rae.type, rae.created_at AS created_at, rae.updated_at, rae.width, rae.height, rae.duration_in_seconds, rae.is_favorite, rae.thumb_hash, rae.checksum, rae.owner_id, rae.live_photo_video_id, 0 AS orientation, rae.stack_id, NULL AS i_cloud_id, NULL AS latitude, NULL AS longitude, NULL AS adjustmentTime, rae.is_edited, 0 AS playback_style FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT NULL AS remote_id, lae.id AS local_id, lae.name, lae.type, lae.created_at AS created_at, lae.updated_at, lae.width, lae.height, lae.duration_in_seconds, lae.is_favorite, NULL AS thumb_hash, lae.checksum, NULL AS owner_id, NULL AS live_photo_video_id, lae.orientation, NULL AS stack_id, lae.i_cloud_id, lae.latitude, lae.longitude, lae.adjustment_time, 0 AS is_edited, lae.playback_style FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2) ORDER BY created_at DESC ${generatedlimit.sql}',
|
||||
'SELECT rae.id AS remote_id, (SELECT lae.id FROM local_asset_entity AS lae WHERE lae.checksum = rae.checksum LIMIT 1) AS local_id, rae.name, rae.type, rae.created_at AS created_at, rae.updated_at, rae.width, rae.height, rae.duration_ms, rae.is_favorite, rae.thumb_hash, rae.checksum, rae.owner_id, rae.live_photo_video_id, 0 AS orientation, rae.stack_id, NULL AS i_cloud_id, NULL AS latitude, NULL AS longitude, NULL AS adjustmentTime, rae.is_edited, 0 AS playback_style FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT NULL AS remote_id, lae.id AS local_id, lae.name, lae.type, lae.created_at AS created_at, lae.updated_at, lae.width, lae.height, lae.duration_ms, lae.is_favorite, NULL AS thumb_hash, lae.checksum, NULL AS owner_id, NULL AS live_photo_video_id, lae.orientation, NULL AS stack_id, lae.i_cloud_id, lae.latitude, lae.longitude, lae.adjustment_time, 0 AS is_edited, lae.playback_style FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2) ORDER BY created_at DESC ${generatedlimit.sql}',
|
||||
variables: [
|
||||
for (var $ in userIds) i0.Variable<String>($),
|
||||
...generatedlimit.introducedVariables,
|
||||
|
|
@ -54,7 +54,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
updatedAt: row.read<DateTime>('updated_at'),
|
||||
width: row.readNullable<int>('width'),
|
||||
height: row.readNullable<int>('height'),
|
||||
durationInSeconds: row.readNullable<int>('duration_in_seconds'),
|
||||
durationMs: row.readNullable<int>('duration_ms'),
|
||||
isFavorite: row.read<bool>('is_favorite'),
|
||||
thumbHash: row.readNullable<String>('thumb_hash'),
|
||||
checksum: row.readNullable<String>('checksum'),
|
||||
|
|
@ -127,7 +127,7 @@ class MergedAssetResult {
|
|||
final DateTime updatedAt;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final int? durationInSeconds;
|
||||
final int? durationMs;
|
||||
final bool isFavorite;
|
||||
final String? thumbHash;
|
||||
final String? checksum;
|
||||
|
|
@ -150,7 +150,7 @@ class MergedAssetResult {
|
|||
required this.updatedAt,
|
||||
this.width,
|
||||
this.height,
|
||||
this.durationInSeconds,
|
||||
this.durationMs,
|
||||
required this.isFavorite,
|
||||
this.thumbHash,
|
||||
this.checksum,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ extension RemoteAssetEntityDataDomainEx on RemoteAssetEntityData {
|
|||
type: type,
|
||||
createdAt: createdAt,
|
||||
updatedAt: updatedAt,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
isFavorite: isFavorite,
|
||||
height: height,
|
||||
width: width,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ typedef $$RemoteAssetEntityTableCreateCompanionBuilder =
|
|||
i0.Value<DateTime> updatedAt,
|
||||
i0.Value<int?> width,
|
||||
i0.Value<int?> height,
|
||||
i0.Value<int?> durationInSeconds,
|
||||
i0.Value<int?> durationMs,
|
||||
required String id,
|
||||
required String checksum,
|
||||
i0.Value<bool> isFavorite,
|
||||
|
|
@ -41,7 +41,7 @@ typedef $$RemoteAssetEntityTableUpdateCompanionBuilder =
|
|||
i0.Value<DateTime> updatedAt,
|
||||
i0.Value<int?> width,
|
||||
i0.Value<int?> height,
|
||||
i0.Value<int?> durationInSeconds,
|
||||
i0.Value<int?> durationMs,
|
||||
i0.Value<String> id,
|
||||
i0.Value<String> checksum,
|
||||
i0.Value<bool> isFavorite,
|
||||
|
|
@ -142,8 +142,8 @@ class $$RemoteAssetEntityTableFilterComposer
|
|||
builder: (column) => i0.ColumnFilters(column),
|
||||
);
|
||||
|
||||
i0.ColumnFilters<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.ColumnFilters<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => i0.ColumnFilters(column),
|
||||
);
|
||||
|
||||
|
|
@ -270,8 +270,8 @@ class $$RemoteAssetEntityTableOrderingComposer
|
|||
builder: (column) => i0.ColumnOrderings(column),
|
||||
);
|
||||
|
||||
i0.ColumnOrderings<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.ColumnOrderings<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => i0.ColumnOrderings(column),
|
||||
);
|
||||
|
||||
|
|
@ -385,8 +385,8 @@ class $$RemoteAssetEntityTableAnnotationComposer
|
|||
i0.GeneratedColumn<int> get height =>
|
||||
$composableBuilder(column: $table.height, builder: (column) => column);
|
||||
|
||||
i0.GeneratedColumn<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.GeneratedColumn<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => column,
|
||||
);
|
||||
|
||||
|
|
@ -499,7 +499,7 @@ class $$RemoteAssetEntityTableTableManager
|
|||
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
i0.Value<String> id = const i0.Value.absent(),
|
||||
i0.Value<String> checksum = const i0.Value.absent(),
|
||||
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -520,7 +520,7 @@ class $$RemoteAssetEntityTableTableManager
|
|||
updatedAt: updatedAt,
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
id: id,
|
||||
checksum: checksum,
|
||||
isFavorite: isFavorite,
|
||||
|
|
@ -542,7 +542,7 @@ class $$RemoteAssetEntityTableTableManager
|
|||
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
required String id,
|
||||
required String checksum,
|
||||
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -562,7 +562,7 @@ class $$RemoteAssetEntityTableTableManager
|
|||
updatedAt: updatedAt,
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
id: id,
|
||||
checksum: checksum,
|
||||
isFavorite: isFavorite,
|
||||
|
|
@ -724,17 +724,17 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const i0.VerificationMeta _durationInSecondsMeta =
|
||||
const i0.VerificationMeta('durationInSeconds');
|
||||
static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta(
|
||||
'durationMs',
|
||||
);
|
||||
@override
|
||||
late final i0.GeneratedColumn<int> durationInSeconds =
|
||||
i0.GeneratedColumn<int>(
|
||||
'duration_in_seconds',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
late final i0.GeneratedColumn<int> durationMs = i0.GeneratedColumn<int>(
|
||||
'duration_ms',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id');
|
||||
@override
|
||||
late final i0.GeneratedColumn<String> id = i0.GeneratedColumn<String>(
|
||||
|
|
@ -886,7 +886,7 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
id,
|
||||
checksum,
|
||||
isFavorite,
|
||||
|
|
@ -944,13 +944,10 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
height.isAcceptableOrUnknown(data['height']!, _heightMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('duration_in_seconds')) {
|
||||
if (data.containsKey('duration_ms')) {
|
||||
context.handle(
|
||||
_durationInSecondsMeta,
|
||||
durationInSeconds.isAcceptableOrUnknown(
|
||||
data['duration_in_seconds']!,
|
||||
_durationInSecondsMeta,
|
||||
),
|
||||
_durationMsMeta,
|
||||
durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('id')) {
|
||||
|
|
@ -1066,9 +1063,9 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
i0.DriftSqlType.int,
|
||||
data['${effectivePrefix}height'],
|
||||
),
|
||||
durationInSeconds: attachedDatabase.typeMapping.read(
|
||||
durationMs: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.int,
|
||||
data['${effectivePrefix}duration_in_seconds'],
|
||||
data['${effectivePrefix}duration_ms'],
|
||||
),
|
||||
id: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.string,
|
||||
|
|
@ -1148,7 +1145,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
final DateTime updatedAt;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final int? durationInSeconds;
|
||||
final int? durationMs;
|
||||
final String id;
|
||||
final String checksum;
|
||||
final bool isFavorite;
|
||||
|
|
@ -1168,7 +1165,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
required this.updatedAt,
|
||||
this.width,
|
||||
this.height,
|
||||
this.durationInSeconds,
|
||||
this.durationMs,
|
||||
required this.id,
|
||||
required this.checksum,
|
||||
required this.isFavorite,
|
||||
|
|
@ -1199,8 +1196,8 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
if (!nullToAbsent || height != null) {
|
||||
map['height'] = i0.Variable<int>(height);
|
||||
}
|
||||
if (!nullToAbsent || durationInSeconds != null) {
|
||||
map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds);
|
||||
if (!nullToAbsent || durationMs != null) {
|
||||
map['duration_ms'] = i0.Variable<int>(durationMs);
|
||||
}
|
||||
map['id'] = i0.Variable<String>(id);
|
||||
map['checksum'] = i0.Variable<String>(checksum);
|
||||
|
|
@ -1247,7 +1244,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
|
||||
width: serializer.fromJson<int?>(json['width']),
|
||||
height: serializer.fromJson<int?>(json['height']),
|
||||
durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),
|
||||
durationMs: serializer.fromJson<int?>(json['durationMs']),
|
||||
id: serializer.fromJson<String>(json['id']),
|
||||
checksum: serializer.fromJson<String>(json['checksum']),
|
||||
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
|
||||
|
|
@ -1276,7 +1273,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
'updatedAt': serializer.toJson<DateTime>(updatedAt),
|
||||
'width': serializer.toJson<int?>(width),
|
||||
'height': serializer.toJson<int?>(height),
|
||||
'durationInSeconds': serializer.toJson<int?>(durationInSeconds),
|
||||
'durationMs': serializer.toJson<int?>(durationMs),
|
||||
'id': serializer.toJson<String>(id),
|
||||
'checksum': serializer.toJson<String>(checksum),
|
||||
'isFavorite': serializer.toJson<bool>(isFavorite),
|
||||
|
|
@ -1301,7 +1298,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
DateTime? updatedAt,
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
String? id,
|
||||
String? checksum,
|
||||
bool? isFavorite,
|
||||
|
|
@ -1321,9 +1318,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width.present ? width.value : this.width,
|
||||
height: height.present ? height.value : this.height,
|
||||
durationInSeconds: durationInSeconds.present
|
||||
? durationInSeconds.value
|
||||
: this.durationInSeconds,
|
||||
durationMs: durationMs.present ? durationMs.value : this.durationMs,
|
||||
id: id ?? this.id,
|
||||
checksum: checksum ?? this.checksum,
|
||||
isFavorite: isFavorite ?? this.isFavorite,
|
||||
|
|
@ -1349,9 +1344,9 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
||||
width: data.width.present ? data.width.value : this.width,
|
||||
height: data.height.present ? data.height.value : this.height,
|
||||
durationInSeconds: data.durationInSeconds.present
|
||||
? data.durationInSeconds.value
|
||||
: this.durationInSeconds,
|
||||
durationMs: data.durationMs.present
|
||||
? data.durationMs.value
|
||||
: this.durationMs,
|
||||
id: data.id.present ? data.id.value : this.id,
|
||||
checksum: data.checksum.present ? data.checksum.value : this.checksum,
|
||||
isFavorite: data.isFavorite.present
|
||||
|
|
@ -1384,7 +1379,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
..write('updatedAt: $updatedAt, ')
|
||||
..write('width: $width, ')
|
||||
..write('height: $height, ')
|
||||
..write('durationInSeconds: $durationInSeconds, ')
|
||||
..write('durationMs: $durationMs, ')
|
||||
..write('id: $id, ')
|
||||
..write('checksum: $checksum, ')
|
||||
..write('isFavorite: $isFavorite, ')
|
||||
|
|
@ -1409,7 +1404,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
id,
|
||||
checksum,
|
||||
isFavorite,
|
||||
|
|
@ -1433,7 +1428,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
other.updatedAt == this.updatedAt &&
|
||||
other.width == this.width &&
|
||||
other.height == this.height &&
|
||||
other.durationInSeconds == this.durationInSeconds &&
|
||||
other.durationMs == this.durationMs &&
|
||||
other.id == this.id &&
|
||||
other.checksum == this.checksum &&
|
||||
other.isFavorite == this.isFavorite &&
|
||||
|
|
@ -1456,7 +1451,7 @@ class RemoteAssetEntityCompanion
|
|||
final i0.Value<DateTime> updatedAt;
|
||||
final i0.Value<int?> width;
|
||||
final i0.Value<int?> height;
|
||||
final i0.Value<int?> durationInSeconds;
|
||||
final i0.Value<int?> durationMs;
|
||||
final i0.Value<String> id;
|
||||
final i0.Value<String> checksum;
|
||||
final i0.Value<bool> isFavorite;
|
||||
|
|
@ -1476,7 +1471,7 @@ class RemoteAssetEntityCompanion
|
|||
this.updatedAt = const i0.Value.absent(),
|
||||
this.width = const i0.Value.absent(),
|
||||
this.height = const i0.Value.absent(),
|
||||
this.durationInSeconds = const i0.Value.absent(),
|
||||
this.durationMs = const i0.Value.absent(),
|
||||
this.id = const i0.Value.absent(),
|
||||
this.checksum = const i0.Value.absent(),
|
||||
this.isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -1497,7 +1492,7 @@ class RemoteAssetEntityCompanion
|
|||
this.updatedAt = const i0.Value.absent(),
|
||||
this.width = const i0.Value.absent(),
|
||||
this.height = const i0.Value.absent(),
|
||||
this.durationInSeconds = const i0.Value.absent(),
|
||||
this.durationMs = const i0.Value.absent(),
|
||||
required String id,
|
||||
required String checksum,
|
||||
this.isFavorite = const i0.Value.absent(),
|
||||
|
|
@ -1523,7 +1518,7 @@ class RemoteAssetEntityCompanion
|
|||
i0.Expression<DateTime>? updatedAt,
|
||||
i0.Expression<int>? width,
|
||||
i0.Expression<int>? height,
|
||||
i0.Expression<int>? durationInSeconds,
|
||||
i0.Expression<int>? durationMs,
|
||||
i0.Expression<String>? id,
|
||||
i0.Expression<String>? checksum,
|
||||
i0.Expression<bool>? isFavorite,
|
||||
|
|
@ -1544,7 +1539,7 @@ class RemoteAssetEntityCompanion
|
|||
if (updatedAt != null) 'updated_at': updatedAt,
|
||||
if (width != null) 'width': width,
|
||||
if (height != null) 'height': height,
|
||||
if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,
|
||||
if (durationMs != null) 'duration_ms': durationMs,
|
||||
if (id != null) 'id': id,
|
||||
if (checksum != null) 'checksum': checksum,
|
||||
if (isFavorite != null) 'is_favorite': isFavorite,
|
||||
|
|
@ -1567,7 +1562,7 @@ class RemoteAssetEntityCompanion
|
|||
i0.Value<DateTime>? updatedAt,
|
||||
i0.Value<int?>? width,
|
||||
i0.Value<int?>? height,
|
||||
i0.Value<int?>? durationInSeconds,
|
||||
i0.Value<int?>? durationMs,
|
||||
i0.Value<String>? id,
|
||||
i0.Value<String>? checksum,
|
||||
i0.Value<bool>? isFavorite,
|
||||
|
|
@ -1588,7 +1583,7 @@ class RemoteAssetEntityCompanion
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
durationInSeconds: durationInSeconds ?? this.durationInSeconds,
|
||||
durationMs: durationMs ?? this.durationMs,
|
||||
id: id ?? this.id,
|
||||
checksum: checksum ?? this.checksum,
|
||||
isFavorite: isFavorite ?? this.isFavorite,
|
||||
|
|
@ -1627,8 +1622,8 @@ class RemoteAssetEntityCompanion
|
|||
if (height.present) {
|
||||
map['height'] = i0.Variable<int>(height.value);
|
||||
}
|
||||
if (durationInSeconds.present) {
|
||||
map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds.value);
|
||||
if (durationMs.present) {
|
||||
map['duration_ms'] = i0.Variable<int>(durationMs.value);
|
||||
}
|
||||
if (id.present) {
|
||||
map['id'] = i0.Variable<String>(id.value);
|
||||
|
|
@ -1680,7 +1675,7 @@ class RemoteAssetEntityCompanion
|
|||
..write('updatedAt: $updatedAt, ')
|
||||
..write('width: $width, ')
|
||||
..write('height: $height, ')
|
||||
..write('durationInSeconds: $durationInSeconds, ')
|
||||
..write('durationMs: $durationMs, ')
|
||||
..write('id: $id, ')
|
||||
..write('checksum: $checksum, ')
|
||||
..write('isFavorite: $isFavorite, ')
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ extension TrashedLocalAssetEntityDataDomainExtension on TrashedLocalAssetEntityD
|
|||
type: type,
|
||||
createdAt: createdAt,
|
||||
updatedAt: updatedAt,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
isFavorite: isFavorite,
|
||||
height: height,
|
||||
width: width,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ typedef $$TrashedLocalAssetEntityTableCreateCompanionBuilder =
|
|||
i0.Value<DateTime> updatedAt,
|
||||
i0.Value<int?> width,
|
||||
i0.Value<int?> height,
|
||||
i0.Value<int?> durationInSeconds,
|
||||
i0.Value<int?> durationMs,
|
||||
required String id,
|
||||
required String albumId,
|
||||
i0.Value<String?> checksum,
|
||||
|
|
@ -33,7 +33,7 @@ typedef $$TrashedLocalAssetEntityTableUpdateCompanionBuilder =
|
|||
i0.Value<DateTime> updatedAt,
|
||||
i0.Value<int?> width,
|
||||
i0.Value<int?> height,
|
||||
i0.Value<int?> durationInSeconds,
|
||||
i0.Value<int?> durationMs,
|
||||
i0.Value<String> id,
|
||||
i0.Value<String> albumId,
|
||||
i0.Value<String?> checksum,
|
||||
|
|
@ -84,8 +84,8 @@ class $$TrashedLocalAssetEntityTableFilterComposer
|
|||
builder: (column) => i0.ColumnFilters(column),
|
||||
);
|
||||
|
||||
i0.ColumnFilters<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.ColumnFilters<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => i0.ColumnFilters(column),
|
||||
);
|
||||
|
||||
|
|
@ -171,8 +171,8 @@ class $$TrashedLocalAssetEntityTableOrderingComposer
|
|||
builder: (column) => i0.ColumnOrderings(column),
|
||||
);
|
||||
|
||||
i0.ColumnOrderings<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.ColumnOrderings<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => i0.ColumnOrderings(column),
|
||||
);
|
||||
|
||||
|
|
@ -240,8 +240,8 @@ class $$TrashedLocalAssetEntityTableAnnotationComposer
|
|||
i0.GeneratedColumn<int> get height =>
|
||||
$composableBuilder(column: $table.height, builder: (column) => column);
|
||||
|
||||
i0.GeneratedColumn<int> get durationInSeconds => $composableBuilder(
|
||||
column: $table.durationInSeconds,
|
||||
i0.GeneratedColumn<int> get durationMs => $composableBuilder(
|
||||
column: $table.durationMs,
|
||||
builder: (column) => column,
|
||||
);
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ class $$TrashedLocalAssetEntityTableTableManager
|
|||
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
i0.Value<String> id = const i0.Value.absent(),
|
||||
i0.Value<String> albumId = const i0.Value.absent(),
|
||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||
|
|
@ -342,7 +342,7 @@ class $$TrashedLocalAssetEntityTableTableManager
|
|||
updatedAt: updatedAt,
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
id: id,
|
||||
albumId: albumId,
|
||||
checksum: checksum,
|
||||
|
|
@ -359,7 +359,7 @@ class $$TrashedLocalAssetEntityTableTableManager
|
|||
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
required String id,
|
||||
required String albumId,
|
||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||
|
|
@ -375,7 +375,7 @@ class $$TrashedLocalAssetEntityTableTableManager
|
|||
updatedAt: updatedAt,
|
||||
width: width,
|
||||
height: height,
|
||||
durationInSeconds: durationInSeconds,
|
||||
durationMs: durationMs,
|
||||
id: id,
|
||||
albumId: albumId,
|
||||
checksum: checksum,
|
||||
|
|
@ -498,17 +498,17 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
|
|||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const i0.VerificationMeta _durationInSecondsMeta =
|
||||
const i0.VerificationMeta('durationInSeconds');
|
||||
static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta(
|
||||
'durationMs',
|
||||
);
|
||||
@override
|
||||
late final i0.GeneratedColumn<int> durationInSeconds =
|
||||
i0.GeneratedColumn<int>(
|
||||
'duration_in_seconds',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
late final i0.GeneratedColumn<int> durationMs = i0.GeneratedColumn<int>(
|
||||
'duration_ms',
|
||||
aliasedName,
|
||||
true,
|
||||
type: i0.DriftSqlType.int,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id');
|
||||
@override
|
||||
late final i0.GeneratedColumn<String> id = i0.GeneratedColumn<String>(
|
||||
|
|
@ -599,7 +599,7 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
id,
|
||||
albumId,
|
||||
checksum,
|
||||
|
|
@ -652,13 +652,10 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
|
|||
height.isAcceptableOrUnknown(data['height']!, _heightMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('duration_in_seconds')) {
|
||||
if (data.containsKey('duration_ms')) {
|
||||
context.handle(
|
||||
_durationInSecondsMeta,
|
||||
durationInSeconds.isAcceptableOrUnknown(
|
||||
data['duration_in_seconds']!,
|
||||
_durationInSecondsMeta,
|
||||
),
|
||||
_durationMsMeta,
|
||||
durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('id')) {
|
||||
|
|
@ -733,9 +730,9 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
|
|||
i0.DriftSqlType.int,
|
||||
data['${effectivePrefix}height'],
|
||||
),
|
||||
durationInSeconds: attachedDatabase.typeMapping.read(
|
||||
durationMs: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.int,
|
||||
data['${effectivePrefix}duration_in_seconds'],
|
||||
data['${effectivePrefix}duration_ms'],
|
||||
),
|
||||
id: attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.string,
|
||||
|
|
@ -800,7 +797,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
final DateTime updatedAt;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final int? durationInSeconds;
|
||||
final int? durationMs;
|
||||
final String id;
|
||||
final String albumId;
|
||||
final String? checksum;
|
||||
|
|
@ -815,7 +812,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
required this.updatedAt,
|
||||
this.width,
|
||||
this.height,
|
||||
this.durationInSeconds,
|
||||
this.durationMs,
|
||||
required this.id,
|
||||
required this.albumId,
|
||||
this.checksum,
|
||||
|
|
@ -841,8 +838,8 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
if (!nullToAbsent || height != null) {
|
||||
map['height'] = i0.Variable<int>(height);
|
||||
}
|
||||
if (!nullToAbsent || durationInSeconds != null) {
|
||||
map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds);
|
||||
if (!nullToAbsent || durationMs != null) {
|
||||
map['duration_ms'] = i0.Variable<int>(durationMs);
|
||||
}
|
||||
map['id'] = i0.Variable<String>(id);
|
||||
map['album_id'] = i0.Variable<String>(albumId);
|
||||
|
|
@ -880,7 +877,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
|
||||
width: serializer.fromJson<int?>(json['width']),
|
||||
height: serializer.fromJson<int?>(json['height']),
|
||||
durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),
|
||||
durationMs: serializer.fromJson<int?>(json['durationMs']),
|
||||
id: serializer.fromJson<String>(json['id']),
|
||||
albumId: serializer.fromJson<String>(json['albumId']),
|
||||
checksum: serializer.fromJson<String?>(json['checksum']),
|
||||
|
|
@ -905,7 +902,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
'updatedAt': serializer.toJson<DateTime>(updatedAt),
|
||||
'width': serializer.toJson<int?>(width),
|
||||
'height': serializer.toJson<int?>(height),
|
||||
'durationInSeconds': serializer.toJson<int?>(durationInSeconds),
|
||||
'durationMs': serializer.toJson<int?>(durationMs),
|
||||
'id': serializer.toJson<String>(id),
|
||||
'albumId': serializer.toJson<String>(albumId),
|
||||
'checksum': serializer.toJson<String?>(checksum),
|
||||
|
|
@ -929,7 +926,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
DateTime? updatedAt,
|
||||
i0.Value<int?> width = const i0.Value.absent(),
|
||||
i0.Value<int?> height = const i0.Value.absent(),
|
||||
i0.Value<int?> durationInSeconds = const i0.Value.absent(),
|
||||
i0.Value<int?> durationMs = const i0.Value.absent(),
|
||||
String? id,
|
||||
String? albumId,
|
||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||
|
|
@ -944,9 +941,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width.present ? width.value : this.width,
|
||||
height: height.present ? height.value : this.height,
|
||||
durationInSeconds: durationInSeconds.present
|
||||
? durationInSeconds.value
|
||||
: this.durationInSeconds,
|
||||
durationMs: durationMs.present ? durationMs.value : this.durationMs,
|
||||
id: id ?? this.id,
|
||||
albumId: albumId ?? this.albumId,
|
||||
checksum: checksum.present ? checksum.value : this.checksum,
|
||||
|
|
@ -965,9 +960,9 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt,
|
||||
width: data.width.present ? data.width.value : this.width,
|
||||
height: data.height.present ? data.height.value : this.height,
|
||||
durationInSeconds: data.durationInSeconds.present
|
||||
? data.durationInSeconds.value
|
||||
: this.durationInSeconds,
|
||||
durationMs: data.durationMs.present
|
||||
? data.durationMs.value
|
||||
: this.durationMs,
|
||||
id: data.id.present ? data.id.value : this.id,
|
||||
albumId: data.albumId.present ? data.albumId.value : this.albumId,
|
||||
checksum: data.checksum.present ? data.checksum.value : this.checksum,
|
||||
|
|
@ -993,7 +988,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
..write('updatedAt: $updatedAt, ')
|
||||
..write('width: $width, ')
|
||||
..write('height: $height, ')
|
||||
..write('durationInSeconds: $durationInSeconds, ')
|
||||
..write('durationMs: $durationMs, ')
|
||||
..write('id: $id, ')
|
||||
..write('albumId: $albumId, ')
|
||||
..write('checksum: $checksum, ')
|
||||
|
|
@ -1013,7 +1008,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
id,
|
||||
albumId,
|
||||
checksum,
|
||||
|
|
@ -1032,7 +1027,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
|
|||
other.updatedAt == this.updatedAt &&
|
||||
other.width == this.width &&
|
||||
other.height == this.height &&
|
||||
other.durationInSeconds == this.durationInSeconds &&
|
||||
other.durationMs == this.durationMs &&
|
||||
other.id == this.id &&
|
||||
other.albumId == this.albumId &&
|
||||
other.checksum == this.checksum &&
|
||||
|
|
@ -1050,7 +1045,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
final i0.Value<DateTime> updatedAt;
|
||||
final i0.Value<int?> width;
|
||||
final i0.Value<int?> height;
|
||||
final i0.Value<int?> durationInSeconds;
|
||||
final i0.Value<int?> durationMs;
|
||||
final i0.Value<String> id;
|
||||
final i0.Value<String> albumId;
|
||||
final i0.Value<String?> checksum;
|
||||
|
|
@ -1065,7 +1060,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
this.updatedAt = const i0.Value.absent(),
|
||||
this.width = const i0.Value.absent(),
|
||||
this.height = const i0.Value.absent(),
|
||||
this.durationInSeconds = const i0.Value.absent(),
|
||||
this.durationMs = const i0.Value.absent(),
|
||||
this.id = const i0.Value.absent(),
|
||||
this.albumId = const i0.Value.absent(),
|
||||
this.checksum = const i0.Value.absent(),
|
||||
|
|
@ -1081,7 +1076,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
this.updatedAt = const i0.Value.absent(),
|
||||
this.width = const i0.Value.absent(),
|
||||
this.height = const i0.Value.absent(),
|
||||
this.durationInSeconds = const i0.Value.absent(),
|
||||
this.durationMs = const i0.Value.absent(),
|
||||
required String id,
|
||||
required String albumId,
|
||||
this.checksum = const i0.Value.absent(),
|
||||
|
|
@ -1101,7 +1096,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
i0.Expression<DateTime>? updatedAt,
|
||||
i0.Expression<int>? width,
|
||||
i0.Expression<int>? height,
|
||||
i0.Expression<int>? durationInSeconds,
|
||||
i0.Expression<int>? durationMs,
|
||||
i0.Expression<String>? id,
|
||||
i0.Expression<String>? albumId,
|
||||
i0.Expression<String>? checksum,
|
||||
|
|
@ -1117,7 +1112,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
if (updatedAt != null) 'updated_at': updatedAt,
|
||||
if (width != null) 'width': width,
|
||||
if (height != null) 'height': height,
|
||||
if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,
|
||||
if (durationMs != null) 'duration_ms': durationMs,
|
||||
if (id != null) 'id': id,
|
||||
if (albumId != null) 'album_id': albumId,
|
||||
if (checksum != null) 'checksum': checksum,
|
||||
|
|
@ -1135,7 +1130,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
i0.Value<DateTime>? updatedAt,
|
||||
i0.Value<int?>? width,
|
||||
i0.Value<int?>? height,
|
||||
i0.Value<int?>? durationInSeconds,
|
||||
i0.Value<int?>? durationMs,
|
||||
i0.Value<String>? id,
|
||||
i0.Value<String>? albumId,
|
||||
i0.Value<String?>? checksum,
|
||||
|
|
@ -1151,7 +1146,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
durationInSeconds: durationInSeconds ?? this.durationInSeconds,
|
||||
durationMs: durationMs ?? this.durationMs,
|
||||
id: id ?? this.id,
|
||||
albumId: albumId ?? this.albumId,
|
||||
checksum: checksum ?? this.checksum,
|
||||
|
|
@ -1185,8 +1180,8 @@ class TrashedLocalAssetEntityCompanion
|
|||
if (height.present) {
|
||||
map['height'] = i0.Variable<int>(height.value);
|
||||
}
|
||||
if (durationInSeconds.present) {
|
||||
map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds.value);
|
||||
if (durationMs.present) {
|
||||
map['duration_ms'] = i0.Variable<int>(durationMs.value);
|
||||
}
|
||||
if (id.present) {
|
||||
map['id'] = i0.Variable<String>(id.value);
|
||||
|
|
@ -1227,7 +1222,7 @@ class TrashedLocalAssetEntityCompanion
|
|||
..write('updatedAt: $updatedAt, ')
|
||||
..write('width: $width, ')
|
||||
..write('height: $height, ')
|
||||
..write('durationInSeconds: $durationInSeconds, ')
|
||||
..write('durationMs: $durationMs, ')
|
||||
..write('id: $id, ')
|
||||
..write('albumId: $albumId, ')
|
||||
..write('checksum: $checksum, ')
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import 'package:immich_mobile/infrastructure/entities/exif.entity.dart';
|
|||
import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/memory.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/partner.entity.dart';
|
||||
|
|
@ -18,10 +19,12 @@ import 'package:immich_mobile/infrastructure/entities/remote_album.entity.dart';
|
|||
import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/stack.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/store.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/user.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/db.repository.drift.dart';
|
||||
|
|
@ -81,7 +84,7 @@ class Drift extends $Drift {
|
|||
}
|
||||
|
||||
@override
|
||||
int get schemaVersion => 22;
|
||||
int get schemaVersion => 23;
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration => MigrationStrategy(
|
||||
|
|
@ -222,6 +225,27 @@ class Drift extends $Drift {
|
|||
await m.createTable(v22.assetEditEntity);
|
||||
await m.createIndex(v22.idxAssetEditAssetId);
|
||||
},
|
||||
from22To23: (m, v23) async {
|
||||
await m.renameColumn(v23.localAssetEntity, 'duration_in_seconds', v23.localAssetEntity.durationMs);
|
||||
await m.renameColumn(v23.remoteAssetEntity, 'duration_in_seconds', v23.remoteAssetEntity.durationMs);
|
||||
await m.renameColumn(
|
||||
v23.trashedLocalAssetEntity,
|
||||
'duration_in_seconds',
|
||||
v23.trashedLocalAssetEntity.durationMs,
|
||||
);
|
||||
|
||||
await localAssetEntity.update().write(
|
||||
LocalAssetEntityCompanion.custom(durationMs: v23.localAssetEntity.durationMs * const Constant(1000)),
|
||||
);
|
||||
await remoteAssetEntity.update().write(
|
||||
RemoteAssetEntityCompanion.custom(durationMs: v23.remoteAssetEntity.durationMs * const Constant(1000)),
|
||||
);
|
||||
await trashedLocalAssetEntity.update().write(
|
||||
TrashedLocalAssetEntityCompanion.custom(
|
||||
durationMs: v23.trashedLocalAssetEntity.durationMs * const Constant(1000),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -297,7 +297,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository {
|
|||
updatedAt: Value(asset.updatedAt),
|
||||
width: Value(asset.width),
|
||||
height: Value(asset.height),
|
||||
durationInSeconds: Value(asset.durationInSeconds),
|
||||
durationMs: Value(asset.durationMs),
|
||||
id: asset.id,
|
||||
orientation: Value(asset.orientation),
|
||||
isFavorite: Value(asset.isFavorite),
|
||||
|
|
@ -329,7 +329,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository {
|
|||
updatedAt: Value(asset.updatedAt),
|
||||
width: Value(asset.width),
|
||||
height: Value(asset.height),
|
||||
durationInSeconds: Value(asset.durationInSeconds),
|
||||
durationMs: Value(asset.durationMs),
|
||||
id: asset.id,
|
||||
checksum: const Value(null),
|
||||
orientation: Value(asset.orientation),
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import 'package:immich_mobile/domain/models/asset_edit.model.dart';
|
|||
import 'package:immich_mobile/domain/models/memory.model.dart';
|
||||
import 'package:immich_mobile/domain/models/user.model.dart';
|
||||
import 'package:immich_mobile/domain/models/user_metadata.model.dart';
|
||||
import 'package:immich_mobile/extensions/string_extensions.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart';
|
||||
|
|
@ -190,7 +191,7 @@ class SyncStreamRepository extends DriftDatabaseRepository {
|
|||
type: Value(asset.type.toAssetType()),
|
||||
createdAt: Value.absentIfNull(asset.fileCreatedAt),
|
||||
updatedAt: Value.absentIfNull(asset.fileModifiedAt),
|
||||
durationInSeconds: Value(asset.duration?.toDuration()?.inSeconds ?? 0),
|
||||
durationMs: Value(asset.duration?.toDuration()?.inMilliseconds ?? 0),
|
||||
checksum: Value(asset.checksum),
|
||||
isFavorite: Value(asset.isFavorite),
|
||||
ownerId: Value(asset.ownerId),
|
||||
|
|
@ -843,18 +844,6 @@ extension on api.UserMetadataKey {
|
|||
};
|
||||
}
|
||||
|
||||
extension on String {
|
||||
Duration? toDuration() {
|
||||
try {
|
||||
final parts = split(':').map((e) => double.parse(e).toInt()).toList(growable: false);
|
||||
|
||||
return Duration(hours: parts[0], minutes: parts[1], seconds: parts[2]);
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension on UserAvatarColor {
|
||||
AvatarColor? toAvatarColor() => AvatarColor.values.firstWhereOrNull((c) => c.name == value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
|
|||
width: row.width,
|
||||
height: row.height,
|
||||
isFavorite: row.isFavorite,
|
||||
durationInSeconds: row.durationInSeconds,
|
||||
durationMs: row.durationMs,
|
||||
livePhotoVideoId: row.livePhotoVideoId,
|
||||
stackId: row.stackId,
|
||||
isEdited: row.isEdited,
|
||||
|
|
@ -99,7 +99,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
|
|||
width: row.width,
|
||||
height: row.height,
|
||||
isFavorite: row.isFavorite,
|
||||
durationInSeconds: row.durationInSeconds,
|
||||
durationMs: row.durationMs,
|
||||
orientation: row.orientation,
|
||||
playbackStyle: AssetPlaybackStyle.values[row.playbackStyle],
|
||||
cloudId: row.iCloudId,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
|
|||
updatedAt: Value(item.asset.updatedAt),
|
||||
width: Value(item.asset.width),
|
||||
height: Value(item.asset.height),
|
||||
durationInSeconds: Value(item.asset.durationInSeconds),
|
||||
durationMs: Value(item.asset.durationMs),
|
||||
isFavorite: Value(item.asset.isFavorite),
|
||||
orientation: Value(item.asset.orientation),
|
||||
playbackStyle: Value(item.asset.playbackStyle),
|
||||
|
|
@ -145,7 +145,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
|
|||
type: Value(asset.type),
|
||||
width: Value(asset.width),
|
||||
height: Value(asset.height),
|
||||
durationInSeconds: Value(asset.durationInSeconds),
|
||||
durationMs: Value(asset.durationMs),
|
||||
isFavorite: Value(asset.isFavorite),
|
||||
orientation: Value(asset.orientation),
|
||||
playbackStyle: Value(asset.playbackStyle),
|
||||
|
|
@ -193,7 +193,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
|
|||
updatedAt: Value(e.updatedAt),
|
||||
width: Value(e.width),
|
||||
height: Value(e.height),
|
||||
durationInSeconds: Value(e.durationInSeconds),
|
||||
durationMs: Value(e.durationMs),
|
||||
checksum: Value(e.checksum),
|
||||
isFavorite: Value(e.isFavorite),
|
||||
orientation: Value(e.orientation),
|
||||
|
|
@ -244,7 +244,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
|
|||
updatedAt: Value(e.asset.updatedAt),
|
||||
width: Value(e.asset.width),
|
||||
height: Value(e.asset.height),
|
||||
durationInSeconds: Value(e.asset.durationInSeconds),
|
||||
durationMs: Value(e.asset.durationMs),
|
||||
checksum: Value(e.asset.checksum),
|
||||
isFavorite: Value(e.asset.isFavorite),
|
||||
orientation: Value(e.asset.orientation),
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ mixin AssetEntityMixin on Table {
|
|||
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
|
||||
IntColumn get width => integer().nullable()();
|
||||
IntColumn get height => integer().nullable()();
|
||||
IntColumn get durationInSeconds => integer().nullable()();
|
||||
IntColumn get durationMs => integer().nullable()();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class PlatformAsset {
|
|||
this.updatedAt,
|
||||
this.width,
|
||||
this.height,
|
||||
required this.durationInSeconds,
|
||||
required this.durationMs,
|
||||
required this.orientation,
|
||||
required this.isFavorite,
|
||||
this.adjustmentTime,
|
||||
|
|
@ -120,7 +120,7 @@ class PlatformAsset {
|
|||
|
||||
int? height;
|
||||
|
||||
int durationInSeconds;
|
||||
int durationMs;
|
||||
|
||||
int orientation;
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ class PlatformAsset {
|
|||
updatedAt,
|
||||
width,
|
||||
height,
|
||||
durationInSeconds,
|
||||
durationMs,
|
||||
orientation,
|
||||
isFavorite,
|
||||
adjustmentTime,
|
||||
|
|
@ -167,7 +167,7 @@ class PlatformAsset {
|
|||
updatedAt: result[4] as int?,
|
||||
width: result[5] as int?,
|
||||
height: result[6] as int?,
|
||||
durationInSeconds: result[7]! as int,
|
||||
durationMs: result[7]! as int,
|
||||
orientation: result[8]! as int,
|
||||
isFavorite: result[9]! as bool,
|
||||
adjustmentTime: result[10] as int?,
|
||||
|
|
@ -193,7 +193,7 @@ class PlatformAsset {
|
|||
_deepEquals(updatedAt, other.updatedAt) &&
|
||||
_deepEquals(width, other.width) &&
|
||||
_deepEquals(height, other.height) &&
|
||||
_deepEquals(durationInSeconds, other.durationInSeconds) &&
|
||||
_deepEquals(durationMs, other.durationMs) &&
|
||||
_deepEquals(orientation, other.orientation) &&
|
||||
_deepEquals(isFavorite, other.isFavorite) &&
|
||||
_deepEquals(adjustmentTime, other.adjustmentTime) &&
|
||||
|
|
|
|||
|
|
@ -112,10 +112,7 @@ class _AssetPropertiesSectionState extends ConsumerState<_AssetPropertiesSection
|
|||
_PropertyItem(label: 'Updated At', value: asset.updatedAt.toString()),
|
||||
_PropertyItem(label: 'Width', value: asset.width?.toString()),
|
||||
_PropertyItem(label: 'Height', value: asset.height?.toString()),
|
||||
_PropertyItem(
|
||||
label: 'Duration',
|
||||
value: asset.durationInSeconds != null ? '${asset.durationInSeconds} seconds' : null,
|
||||
),
|
||||
_PropertyItem(label: 'Duration', value: asset.durationMs != null ? '${asset.durationMs} ms' : null),
|
||||
_PropertyItem(label: 'Is Favorite', value: asset.isFavorite.toString()),
|
||||
_PropertyItem(label: 'Live Photo Video ID', value: asset.livePhotoVideoId),
|
||||
_PropertyItem(label: 'Is Edited', value: asset.isEdited.toString()),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[tools]
|
||||
flutter = "3.41.6"
|
||||
flutter = "3.41.7"
|
||||
|
||||
[tools."github:CQLabs/homebrew-dcm"]
|
||||
version = "1.30.0"
|
||||
|
|
|
|||
|
|
@ -24,13 +24,11 @@ class AssetMediaStatus {
|
|||
String toJson() => value;
|
||||
|
||||
static const created = AssetMediaStatus._(r'created');
|
||||
static const replaced = AssetMediaStatus._(r'replaced');
|
||||
static const duplicate = AssetMediaStatus._(r'duplicate');
|
||||
|
||||
/// List of all possible values in this [enum][AssetMediaStatus].
|
||||
static const values = <AssetMediaStatus>[
|
||||
created,
|
||||
replaced,
|
||||
duplicate,
|
||||
];
|
||||
|
||||
|
|
@ -71,7 +69,6 @@ class AssetMediaStatusTypeTransformer {
|
|||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'created': return AssetMediaStatus.created;
|
||||
case r'replaced': return AssetMediaStatus.replaced;
|
||||
case r'duplicate': return AssetMediaStatus.duplicate;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class PlatformAsset {
|
|||
final int? updatedAt;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final int durationInSeconds;
|
||||
final int durationMs;
|
||||
final int orientation;
|
||||
final bool isFavorite;
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ class PlatformAsset {
|
|||
this.updatedAt,
|
||||
this.width,
|
||||
this.height,
|
||||
this.durationInSeconds = 0,
|
||||
this.durationMs = 0,
|
||||
this.orientation = 0,
|
||||
this.isFavorite = false,
|
||||
this.adjustmentTime,
|
||||
|
|
|
|||
|
|
@ -1989,4 +1989,4 @@ packages:
|
|||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.11.0 <4.0.0"
|
||||
flutter: "3.41.6"
|
||||
flutter: "3.41.7"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ version: 2.7.5+3046
|
|||
|
||||
environment:
|
||||
sdk: '>=3.11.0 <4.0.0'
|
||||
flutter: 3.41.6
|
||||
flutter: 3.41.7
|
||||
|
||||
dependencies:
|
||||
async: ^2.13.1
|
||||
|
|
|
|||
|
|
@ -1,194 +0,0 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:immich_mobile/domain/models/album/local_album.model.dart';
|
||||
import 'package:immich_mobile/domain/services/hash.service.dart';
|
||||
import 'package:immich_mobile/platform/native_sync_api.g.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
|
||||
import '../../fixtures/album.stub.dart';
|
||||
import '../../fixtures/asset.stub.dart';
|
||||
import '../../infrastructure/repository.mock.dart';
|
||||
import '../service.mock.dart';
|
||||
|
||||
void main() {
|
||||
late HashService sut;
|
||||
late MockLocalAlbumRepository mockAlbumRepo;
|
||||
late MockLocalAssetRepository mockAssetRepo;
|
||||
late MockNativeSyncApi mockNativeApi;
|
||||
late MockTrashedLocalAssetRepository mockTrashedAssetRepo;
|
||||
|
||||
setUp(() {
|
||||
mockAlbumRepo = MockLocalAlbumRepository();
|
||||
mockAssetRepo = MockLocalAssetRepository();
|
||||
mockNativeApi = MockNativeSyncApi();
|
||||
mockTrashedAssetRepo = MockTrashedLocalAssetRepository();
|
||||
|
||||
sut = HashService(
|
||||
localAlbumRepository: mockAlbumRepo,
|
||||
localAssetRepository: mockAssetRepo,
|
||||
nativeSyncApi: mockNativeApi,
|
||||
trashedLocalAssetRepository: mockTrashedAssetRepo,
|
||||
);
|
||||
|
||||
registerFallbackValue(LocalAlbumStub.recent);
|
||||
registerFallbackValue(LocalAssetStub.image1);
|
||||
registerFallbackValue(<String, String>{});
|
||||
|
||||
when(() => mockAssetRepo.reconcileHashesFromCloudId()).thenAnswer((_) async => {});
|
||||
when(() => mockAssetRepo.updateHashes(any())).thenAnswer((_) async => {});
|
||||
});
|
||||
|
||||
group('HashService hashAssets', () {
|
||||
test('skips albums with no assets to hash', () async {
|
||||
when(
|
||||
() => mockAlbumRepo.getBackupAlbums(),
|
||||
).thenAnswer((_) async => [LocalAlbumStub.recent.copyWith(assetCount: 0)]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(LocalAlbumStub.recent.id)).thenAnswer((_) async => []);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verifyNever(() => mockNativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess')));
|
||||
});
|
||||
});
|
||||
|
||||
group('HashService _hashAssets', () {
|
||||
test('skips empty batches', () async {
|
||||
final album = LocalAlbumStub.recent;
|
||||
when(() => mockAlbumRepo.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(album.id)).thenAnswer((_) async => []);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verifyNever(() => mockNativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess')));
|
||||
});
|
||||
|
||||
test('processes assets when available', () async {
|
||||
final album = LocalAlbumStub.recent;
|
||||
final asset = LocalAssetStub.image1;
|
||||
|
||||
when(() => mockAlbumRepo.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]);
|
||||
when(
|
||||
() => mockNativeApi.hashAssets([asset.id], allowNetworkAccess: false),
|
||||
).thenAnswer((_) async => [HashResult(assetId: asset.id, hash: 'test-hash')]);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verify(() => mockNativeApi.hashAssets([asset.id], allowNetworkAccess: false)).called(1);
|
||||
final captured = verify(() => mockAssetRepo.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 1);
|
||||
expect(captured[asset.id], 'test-hash');
|
||||
});
|
||||
|
||||
test('handles failed hashes', () async {
|
||||
final album = LocalAlbumStub.recent;
|
||||
final asset = LocalAssetStub.image1;
|
||||
|
||||
when(() => mockAlbumRepo.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]);
|
||||
when(
|
||||
() => mockNativeApi.hashAssets([asset.id], allowNetworkAccess: false),
|
||||
).thenAnswer((_) async => [HashResult(assetId: asset.id, error: 'Failed to hash')]);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
final captured = verify(() => mockAssetRepo.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 0);
|
||||
});
|
||||
|
||||
test('handles null hash results', () async {
|
||||
final album = LocalAlbumStub.recent;
|
||||
final asset = LocalAssetStub.image1;
|
||||
|
||||
when(() => mockAlbumRepo.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]);
|
||||
when(
|
||||
() => mockNativeApi.hashAssets([asset.id], allowNetworkAccess: false),
|
||||
).thenAnswer((_) async => [HashResult(assetId: asset.id, hash: null)]);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
final captured = verify(() => mockAssetRepo.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 0);
|
||||
});
|
||||
|
||||
test('batches by size limit', () async {
|
||||
const batchSize = 2;
|
||||
final sut = HashService(
|
||||
localAlbumRepository: mockAlbumRepo,
|
||||
localAssetRepository: mockAssetRepo,
|
||||
nativeSyncApi: mockNativeApi,
|
||||
batchSize: batchSize,
|
||||
trashedLocalAssetRepository: mockTrashedAssetRepo,
|
||||
);
|
||||
|
||||
final album = LocalAlbumStub.recent;
|
||||
final asset1 = LocalAssetStub.image1;
|
||||
final asset2 = LocalAssetStub.image2;
|
||||
final asset3 = LocalAssetStub.image1.copyWith(id: 'image3', name: 'image3.jpg');
|
||||
|
||||
final capturedCalls = <List<String>>[];
|
||||
|
||||
when(() => mockAssetRepo.updateHashes(any())).thenAnswer((_) async => {});
|
||||
when(() => mockAlbumRepo.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2, asset3]);
|
||||
when(() => mockNativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))).thenAnswer((
|
||||
invocation,
|
||||
) async {
|
||||
final assetIds = invocation.positionalArguments[0] as List<String>;
|
||||
capturedCalls.add(List<String>.from(assetIds));
|
||||
return assetIds.map((id) => HashResult(assetId: id, hash: '$id-hash')).toList();
|
||||
});
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
expect(capturedCalls.length, 2, reason: 'Should make exactly 2 calls to hashAssets');
|
||||
expect(capturedCalls[0], [asset1.id, asset2.id], reason: 'First call should batch the first two assets');
|
||||
expect(capturedCalls[1], [asset3.id], reason: 'Second call should have the remaining asset');
|
||||
|
||||
verify(() => mockAssetRepo.updateHashes(any())).called(2);
|
||||
});
|
||||
|
||||
test('handles mixed success and failure in batch', () async {
|
||||
final album = LocalAlbumStub.recent;
|
||||
final asset1 = LocalAssetStub.image1;
|
||||
final asset2 = LocalAssetStub.image2;
|
||||
|
||||
when(() => mockAlbumRepo.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2]);
|
||||
when(() => mockNativeApi.hashAssets([asset1.id, asset2.id], allowNetworkAccess: false)).thenAnswer(
|
||||
(_) async => [
|
||||
HashResult(assetId: asset1.id, hash: 'asset1-hash'),
|
||||
HashResult(assetId: asset2.id, error: 'Failed to hash asset2'),
|
||||
],
|
||||
);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
final captured = verify(() => mockAssetRepo.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 1);
|
||||
expect(captured[asset1.id], 'asset1-hash');
|
||||
});
|
||||
|
||||
test('uses allowNetworkAccess based on album backup selection', () async {
|
||||
final selectedAlbum = LocalAlbumStub.recent.copyWith(backupSelection: BackupSelection.selected);
|
||||
final nonSelectedAlbum = LocalAlbumStub.recent.copyWith(id: 'album2', backupSelection: BackupSelection.excluded);
|
||||
final asset1 = LocalAssetStub.image1;
|
||||
final asset2 = LocalAssetStub.image2;
|
||||
|
||||
when(() => mockAlbumRepo.getBackupAlbums()).thenAnswer((_) async => [selectedAlbum, nonSelectedAlbum]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(selectedAlbum.id)).thenAnswer((_) async => [asset1]);
|
||||
when(() => mockAlbumRepo.getAssetsToHash(nonSelectedAlbum.id)).thenAnswer((_) async => [asset2]);
|
||||
when(() => mockNativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))).thenAnswer((
|
||||
invocation,
|
||||
) async {
|
||||
final assetIds = invocation.positionalArguments[0] as List<String>;
|
||||
return assetIds.map((id) => HashResult(assetId: id, hash: '$id-hash')).toList();
|
||||
});
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verify(() => mockNativeApi.hashAssets([asset1.id], allowNetworkAccess: true)).called(1);
|
||||
verify(() => mockNativeApi.hashAssets([asset2.id], allowNetworkAccess: false)).called(1);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ void main() {
|
|||
id: 'remote-id',
|
||||
name: 'remote.jpg',
|
||||
type: AssetType.image.index,
|
||||
durationInSeconds: 0,
|
||||
durationMs: 0,
|
||||
orientation: 0,
|
||||
isFavorite: false,
|
||||
playbackStyle: PlatformAssetPlaybackStyle.image
|
||||
|
|
@ -210,7 +210,7 @@ void main() {
|
|||
id: 'test-id',
|
||||
name: 'test.jpg',
|
||||
type: AssetType.image.index,
|
||||
durationInSeconds: 0,
|
||||
durationMs: 0,
|
||||
orientation: 0,
|
||||
isFavorite: false,
|
||||
createdAt: 1700000000,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift/internal/migrations.dart';
|
||||
import 'schema_v1.dart' as v1;
|
||||
|
|
@ -25,6 +26,7 @@ import 'schema_v19.dart' as v19;
|
|||
import 'schema_v20.dart' as v20;
|
||||
import 'schema_v21.dart' as v21;
|
||||
import 'schema_v22.dart' as v22;
|
||||
import 'schema_v23.dart' as v23;
|
||||
|
||||
class GeneratedHelper implements SchemaInstantiationHelper {
|
||||
@override
|
||||
|
|
@ -74,6 +76,8 @@ class GeneratedHelper implements SchemaInstantiationHelper {
|
|||
return v21.DatabaseAtV21(db);
|
||||
case 22:
|
||||
return v22.DatabaseAtV22(db);
|
||||
case 23:
|
||||
return v23.DatabaseAtV23(db);
|
||||
default:
|
||||
throw MissingSchemaException(version, versions);
|
||||
}
|
||||
|
|
@ -102,5 +106,6 @@ class GeneratedHelper implements SchemaInstantiationHelper {
|
|||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -1974,13 +1976,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2024,7 +2027,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2035,7 +2038,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2047,7 +2050,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2056,14 +2059,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2102,7 +2105,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2111,14 +2114,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2130,7 +2133,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2149,7 +2152,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3430,13 +3432,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3480,7 +3483,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3491,7 +3494,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3503,7 +3506,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3512,14 +3515,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3558,7 +3561,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3567,14 +3570,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3586,7 +3589,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3605,7 +3608,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3469,13 +3471,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3519,7 +3522,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3530,7 +3533,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3542,7 +3545,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3551,14 +3554,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3597,7 +3600,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3606,14 +3609,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3625,7 +3628,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3644,7 +3647,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3469,13 +3471,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3519,7 +3522,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3530,7 +3533,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3542,7 +3545,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3551,14 +3554,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3597,7 +3600,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3606,14 +3609,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3625,7 +3628,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3644,7 +3647,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3469,13 +3471,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3519,7 +3522,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3530,7 +3533,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3542,7 +3545,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3551,14 +3554,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3597,7 +3600,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3606,14 +3609,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3625,7 +3628,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3644,7 +3647,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3582,13 +3584,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3632,7 +3635,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3643,7 +3646,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3655,7 +3658,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3664,14 +3667,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3710,7 +3713,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3719,14 +3722,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3738,7 +3741,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3757,7 +3760,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3582,13 +3584,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3632,7 +3635,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3643,7 +3646,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3655,7 +3658,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3664,14 +3667,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3710,7 +3713,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3719,14 +3722,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3738,7 +3741,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3757,7 +3760,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3618,13 +3620,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3668,7 +3671,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3679,7 +3682,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3691,7 +3694,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3700,14 +3703,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3746,7 +3749,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3755,14 +3758,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3774,7 +3777,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3793,7 +3796,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -1974,13 +1976,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2024,7 +2027,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2035,7 +2038,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2047,7 +2050,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2056,14 +2059,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2102,7 +2105,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2111,14 +2114,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2130,7 +2133,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2149,7 +2152,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3693,13 +3695,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3743,7 +3746,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3754,7 +3757,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3766,7 +3769,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3775,14 +3778,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3821,7 +3824,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3830,14 +3833,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3849,7 +3852,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3868,7 +3871,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -3693,13 +3695,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3743,7 +3746,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3754,7 +3757,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3766,7 +3769,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3775,14 +3778,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3821,7 +3824,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3830,14 +3833,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3849,7 +3852,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3868,7 +3871,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
@ -8409,13 +8412,14 @@ class AssetEditEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> parameters = GeneratedColumn<Uint8List>(
|
||||
'parameters',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> parameters =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'parameters',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<int> sequence = GeneratedColumn<int>(
|
||||
'sequence',
|
||||
aliasedName,
|
||||
|
|
@ -8481,7 +8485,7 @@ class AssetEditEntityData extends DataClass
|
|||
final String id;
|
||||
final String assetId;
|
||||
final int action;
|
||||
final Uint8List parameters;
|
||||
final i2.Uint8List parameters;
|
||||
final int sequence;
|
||||
const AssetEditEntityData({
|
||||
required this.id,
|
||||
|
|
@ -8496,7 +8500,7 @@ class AssetEditEntityData extends DataClass
|
|||
map['id'] = Variable<String>(id);
|
||||
map['asset_id'] = Variable<String>(assetId);
|
||||
map['action'] = Variable<int>(action);
|
||||
map['parameters'] = Variable<Uint8List>(parameters);
|
||||
map['parameters'] = Variable<i2.Uint8List>(parameters);
|
||||
map['sequence'] = Variable<int>(sequence);
|
||||
return map;
|
||||
}
|
||||
|
|
@ -8510,7 +8514,7 @@ class AssetEditEntityData extends DataClass
|
|||
id: serializer.fromJson<String>(json['id']),
|
||||
assetId: serializer.fromJson<String>(json['assetId']),
|
||||
action: serializer.fromJson<int>(json['action']),
|
||||
parameters: serializer.fromJson<Uint8List>(json['parameters']),
|
||||
parameters: serializer.fromJson<i2.Uint8List>(json['parameters']),
|
||||
sequence: serializer.fromJson<int>(json['sequence']),
|
||||
);
|
||||
}
|
||||
|
|
@ -8521,7 +8525,7 @@ class AssetEditEntityData extends DataClass
|
|||
'id': serializer.toJson<String>(id),
|
||||
'assetId': serializer.toJson<String>(assetId),
|
||||
'action': serializer.toJson<int>(action),
|
||||
'parameters': serializer.toJson<Uint8List>(parameters),
|
||||
'parameters': serializer.toJson<i2.Uint8List>(parameters),
|
||||
'sequence': serializer.toJson<int>(sequence),
|
||||
};
|
||||
}
|
||||
|
|
@ -8530,7 +8534,7 @@ class AssetEditEntityData extends DataClass
|
|||
String? id,
|
||||
String? assetId,
|
||||
int? action,
|
||||
Uint8List? parameters,
|
||||
i2.Uint8List? parameters,
|
||||
int? sequence,
|
||||
}) => AssetEditEntityData(
|
||||
id: id ?? this.id,
|
||||
|
|
@ -8586,7 +8590,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
|
|||
final Value<String> id;
|
||||
final Value<String> assetId;
|
||||
final Value<int> action;
|
||||
final Value<Uint8List> parameters;
|
||||
final Value<i2.Uint8List> parameters;
|
||||
final Value<int> sequence;
|
||||
const AssetEditEntityCompanion({
|
||||
this.id = const Value.absent(),
|
||||
|
|
@ -8599,7 +8603,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
|
|||
required String id,
|
||||
required String assetId,
|
||||
required int action,
|
||||
required Uint8List parameters,
|
||||
required i2.Uint8List parameters,
|
||||
required int sequence,
|
||||
}) : id = Value(id),
|
||||
assetId = Value(assetId),
|
||||
|
|
@ -8610,7 +8614,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
|
|||
Expression<String>? id,
|
||||
Expression<String>? assetId,
|
||||
Expression<int>? action,
|
||||
Expression<Uint8List>? parameters,
|
||||
Expression<i2.Uint8List>? parameters,
|
||||
Expression<int>? sequence,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
|
|
@ -8626,7 +8630,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
|
|||
Value<String>? id,
|
||||
Value<String>? assetId,
|
||||
Value<int>? action,
|
||||
Value<Uint8List>? parameters,
|
||||
Value<i2.Uint8List>? parameters,
|
||||
Value<int>? sequence,
|
||||
}) {
|
||||
return AssetEditEntityCompanion(
|
||||
|
|
@ -8651,7 +8655,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
|
|||
map['action'] = Variable<int>(action.value);
|
||||
}
|
||||
if (parameters.present) {
|
||||
map['parameters'] = Variable<Uint8List>(parameters.value);
|
||||
map['parameters'] = Variable<i2.Uint8List>(parameters.value);
|
||||
}
|
||||
if (sequence.present) {
|
||||
map['sequence'] = Variable<int>(sequence.value);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -1971,13 +1973,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2021,7 +2024,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2032,7 +2035,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2044,7 +2047,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2053,14 +2056,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2099,7 +2102,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2108,14 +2111,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2127,7 +2130,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2146,7 +2149,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -2492,13 +2494,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2542,7 +2545,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2553,7 +2556,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2565,7 +2568,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2574,14 +2577,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2620,7 +2623,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2629,14 +2632,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2648,7 +2651,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2667,7 +2670,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -2453,13 +2455,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2503,7 +2506,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2514,7 +2517,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2526,7 +2529,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2535,14 +2538,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2581,7 +2584,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2590,14 +2593,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2609,7 +2612,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2628,7 +2631,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -2489,13 +2491,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2539,7 +2542,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2550,7 +2553,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2562,7 +2565,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2571,14 +2574,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2617,7 +2620,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2626,14 +2629,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2645,7 +2648,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2664,7 +2667,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -2489,13 +2491,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2539,7 +2542,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2550,7 +2553,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2562,7 +2565,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2571,14 +2574,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2617,7 +2620,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2626,14 +2629,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2645,7 +2648,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2664,7 +2667,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -2489,13 +2491,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -2539,7 +2542,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -2550,7 +2553,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -2562,7 +2565,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -2571,14 +2574,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -2617,7 +2620,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -2626,14 +2629,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -2645,7 +2648,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -2664,7 +2667,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// dart format width=80
|
||||
// GENERATED CODE, DO NOT EDIT BY HAND.
|
||||
// ignore_for_file: type=lint
|
||||
import 'dart:typed_data' as i2;
|
||||
// GENERATED BY drift_dev, DO NOT MODIFY.
|
||||
// ignore_for_file: type=lint,unused_import
|
||||
//
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
|
||||
|
|
@ -2985,13 +2987,14 @@ class UserMetadataEntity extends Table
|
|||
type: DriftSqlType.int,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
late final GeneratedColumn<i2.Uint8List> value =
|
||||
GeneratedColumn<i2.Uint8List>(
|
||||
'value',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.blob,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [userId, key, value];
|
||||
@override
|
||||
|
|
@ -3035,7 +3038,7 @@ class UserMetadataEntityData extends DataClass
|
|||
implements Insertable<UserMetadataEntityData> {
|
||||
final String userId;
|
||||
final int key;
|
||||
final Uint8List value;
|
||||
final i2.Uint8List value;
|
||||
const UserMetadataEntityData({
|
||||
required this.userId,
|
||||
required this.key,
|
||||
|
|
@ -3046,7 +3049,7 @@ class UserMetadataEntityData extends DataClass
|
|||
final map = <String, Expression>{};
|
||||
map['user_id'] = Variable<String>(userId);
|
||||
map['key'] = Variable<int>(key);
|
||||
map['value'] = Variable<Uint8List>(value);
|
||||
map['value'] = Variable<i2.Uint8List>(value);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -3058,7 +3061,7 @@ class UserMetadataEntityData extends DataClass
|
|||
return UserMetadataEntityData(
|
||||
userId: serializer.fromJson<String>(json['userId']),
|
||||
key: serializer.fromJson<int>(json['key']),
|
||||
value: serializer.fromJson<Uint8List>(json['value']),
|
||||
value: serializer.fromJson<i2.Uint8List>(json['value']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -3067,14 +3070,14 @@ class UserMetadataEntityData extends DataClass
|
|||
return <String, dynamic>{
|
||||
'userId': serializer.toJson<String>(userId),
|
||||
'key': serializer.toJson<int>(key),
|
||||
'value': serializer.toJson<Uint8List>(value),
|
||||
'value': serializer.toJson<i2.Uint8List>(value),
|
||||
};
|
||||
}
|
||||
|
||||
UserMetadataEntityData copyWith({
|
||||
String? userId,
|
||||
int? key,
|
||||
Uint8List? value,
|
||||
i2.Uint8List? value,
|
||||
}) => UserMetadataEntityData(
|
||||
userId: userId ?? this.userId,
|
||||
key: key ?? this.key,
|
||||
|
|
@ -3113,7 +3116,7 @@ class UserMetadataEntityCompanion
|
|||
extends UpdateCompanion<UserMetadataEntityData> {
|
||||
final Value<String> userId;
|
||||
final Value<int> key;
|
||||
final Value<Uint8List> value;
|
||||
final Value<i2.Uint8List> value;
|
||||
const UserMetadataEntityCompanion({
|
||||
this.userId = const Value.absent(),
|
||||
this.key = const Value.absent(),
|
||||
|
|
@ -3122,14 +3125,14 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion.insert({
|
||||
required String userId,
|
||||
required int key,
|
||||
required Uint8List value,
|
||||
required i2.Uint8List value,
|
||||
}) : userId = Value(userId),
|
||||
key = Value(key),
|
||||
value = Value(value);
|
||||
static Insertable<UserMetadataEntityData> custom({
|
||||
Expression<String>? userId,
|
||||
Expression<int>? key,
|
||||
Expression<Uint8List>? value,
|
||||
Expression<i2.Uint8List>? value,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (userId != null) 'user_id': userId,
|
||||
|
|
@ -3141,7 +3144,7 @@ class UserMetadataEntityCompanion
|
|||
UserMetadataEntityCompanion copyWith({
|
||||
Value<String>? userId,
|
||||
Value<int>? key,
|
||||
Value<Uint8List>? value,
|
||||
Value<i2.Uint8List>? value,
|
||||
}) {
|
||||
return UserMetadataEntityCompanion(
|
||||
userId: userId ?? this.userId,
|
||||
|
|
@ -3160,7 +3163,7 @@ class UserMetadataEntityCompanion
|
|||
map['key'] = Variable<int>(key.value);
|
||||
}
|
||||
if (value.present) {
|
||||
map['value'] = Variable<Uint8List>(value.value);
|
||||
map['value'] = Variable<i2.Uint8List>(value.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import 'package:immich_mobile/domain/models/album/local_album.model.dart';
|
|||
import 'package:immich_mobile/infrastructure/repositories/backup.repository.dart';
|
||||
import 'package:immich_mobile/utils/option.dart';
|
||||
|
||||
import '../../medium/repository_context.dart';
|
||||
import '../repository_context.dart';
|
||||
|
||||
void main() {
|
||||
late MediumRepositoryContext ctx;
|
||||
|
|
@ -4,7 +4,7 @@ import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|||
import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart';
|
||||
import 'package:immich_mobile/utils/option.dart';
|
||||
|
||||
import '../../medium/repository_context.dart';
|
||||
import '../repository_context.dart';
|
||||
|
||||
void main() {
|
||||
late MediumRepositoryContext ctx;
|
||||
|
|
@ -2,7 +2,7 @@ import 'package:flutter_test/flutter_test.dart';
|
|||
import 'package:immich_mobile/constants/enums.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/remote_album.repository.dart';
|
||||
|
||||
import '../../medium/repository_context.dart';
|
||||
import '../repository_context.dart';
|
||||
|
||||
void main() {
|
||||
late MediumRepositoryContext ctx;
|
||||
|
|
@ -18,6 +18,8 @@ import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
|
|||
import 'package:immich_mobile/utils/option.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
import '../utils.dart';
|
||||
|
||||
class MediumRepositoryContext {
|
||||
final Drift db;
|
||||
final Random _random = Random();
|
||||
|
|
@ -51,7 +53,7 @@ class MediumRepositoryContext {
|
|||
DateTime? profileChangedAt,
|
||||
bool? hasProfileImage,
|
||||
}) async {
|
||||
id = id ?? const Uuid().v4();
|
||||
id = TestUtils.uuid(id);
|
||||
return await db
|
||||
.into(db.userEntity)
|
||||
.insertReturning(
|
||||
|
|
@ -60,7 +62,7 @@ class MediumRepositoryContext {
|
|||
email: Value(email ?? '$id@test.com'),
|
||||
name: Value(email ?? 'user_$id'),
|
||||
avatarColor: Value(avatarColor ?? AvatarColor.values[_random.nextInt(AvatarColor.values.length)]),
|
||||
profileChangedAt: Value(profileChangedAt ?? DateTime.now()),
|
||||
profileChangedAt: Value(TestUtils.date(profileChangedAt)),
|
||||
hasProfileImage: Value(hasProfileImage ?? false),
|
||||
),
|
||||
);
|
||||
|
|
@ -75,7 +77,7 @@ class MediumRepositoryContext {
|
|||
DateTime? deletedAt,
|
||||
AssetType? type,
|
||||
AssetVisibility? visibility,
|
||||
int? durationInSeconds,
|
||||
int? durationMs,
|
||||
int? width,
|
||||
int? height,
|
||||
bool? isFavorite,
|
||||
|
|
@ -85,22 +87,22 @@ class MediumRepositoryContext {
|
|||
String? thumbHash,
|
||||
String? libraryId,
|
||||
}) async {
|
||||
id = id ?? const Uuid().v4();
|
||||
createdAt = createdAt ?? DateTime.now();
|
||||
id = TestUtils.uuid(id);
|
||||
createdAt = TestUtils.date(createdAt);
|
||||
return db
|
||||
.into(db.remoteAssetEntity)
|
||||
.insertReturning(
|
||||
RemoteAssetEntityCompanion(
|
||||
id: Value(id),
|
||||
name: Value('remote_$id.jpg'),
|
||||
checksum: Value(checksum ?? const Uuid().v4()),
|
||||
checksum: Value(TestUtils.uuid(checksum)),
|
||||
type: Value(type ?? AssetType.image),
|
||||
createdAt: Value(createdAt),
|
||||
updatedAt: Value(updatedAt ?? DateTime.now()),
|
||||
ownerId: Value(ownerId ?? const Uuid().v4()),
|
||||
updatedAt: Value(TestUtils.date(updatedAt)),
|
||||
ownerId: Value(TestUtils.uuid(ownerId)),
|
||||
visibility: Value(visibility ?? AssetVisibility.timeline),
|
||||
deletedAt: Value(deletedAt),
|
||||
durationInSeconds: Value(durationInSeconds ?? 0),
|
||||
durationMs: Value(durationMs ?? 0),
|
||||
width: Value(width ?? _random.nextInt(1000)),
|
||||
height: Value(height ?? _random.nextInt(1000)),
|
||||
isFavorite: Value(isFavorite ?? false),
|
||||
|
|
@ -108,8 +110,8 @@ class MediumRepositoryContext {
|
|||
livePhotoVideoId: Value(livePhotoVideoId),
|
||||
stackId: Value(stackId),
|
||||
localDateTime: Value(createdAt.toLocal()),
|
||||
thumbHash: Value(thumbHash ?? const Uuid().v4()),
|
||||
libraryId: Value(libraryId ?? const Uuid().v4()),
|
||||
thumbHash: Value(TestUtils.uuid(thumbHash)),
|
||||
libraryId: Value(TestUtils.uuid(libraryId)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -127,9 +129,9 @@ class MediumRepositoryContext {
|
|||
.into(db.remoteAssetCloudIdEntity)
|
||||
.insertReturning(
|
||||
RemoteAssetCloudIdEntityCompanion(
|
||||
assetId: Value(id ?? const Uuid().v4()),
|
||||
cloudId: Value(cloudId ?? const Uuid().v4()),
|
||||
createdAt: Value(createdAt ?? DateTime.now()),
|
||||
assetId: Value(TestUtils.uuid(id)),
|
||||
cloudId: Value(TestUtils.uuid(cloudId)),
|
||||
createdAt: Value(TestUtils.date(createdAt)),
|
||||
adjustmentTime: _resolveUndefined(adjustmentTime, adjustmentTimeOption, DateTime.now()),
|
||||
latitude: _resolveOption(latitude, _random.nextDouble() * 180 - 90),
|
||||
longitude: _resolveOption(longitude, _random.nextDouble() * 360 - 180),
|
||||
|
|
@ -148,16 +150,16 @@ class MediumRepositoryContext {
|
|||
AlbumAssetOrder? order,
|
||||
String? thumbnailAssetId,
|
||||
}) async {
|
||||
id = id ?? const Uuid().v4();
|
||||
id = TestUtils.uuid(id);
|
||||
return db
|
||||
.into(db.remoteAlbumEntity)
|
||||
.insertReturning(
|
||||
RemoteAlbumEntityCompanion(
|
||||
id: Value(id),
|
||||
name: Value(name ?? 'remote_album_$id'),
|
||||
ownerId: Value(ownerId ?? const Uuid().v4()),
|
||||
createdAt: Value(createdAt ?? DateTime.now()),
|
||||
updatedAt: Value(updatedAt ?? DateTime.now()),
|
||||
ownerId: Value(TestUtils.uuid(ownerId)),
|
||||
createdAt: Value(TestUtils.date(createdAt)),
|
||||
updatedAt: Value(TestUtils.date(updatedAt)),
|
||||
description: Value(description ?? 'Description for album $id'),
|
||||
isActivityEnabled: Value(isActivityEnabled ?? false),
|
||||
order: Value(order ?? AlbumAssetOrder.asc),
|
||||
|
|
@ -187,11 +189,11 @@ class MediumRepositoryContext {
|
|||
double? longitude,
|
||||
int? width,
|
||||
int? height,
|
||||
int? durationInSeconds,
|
||||
int? durationMs,
|
||||
int? orientation,
|
||||
DateTime? updatedAt,
|
||||
}) async {
|
||||
id = id ?? const Uuid().v4();
|
||||
id = TestUtils.uuid(id);
|
||||
return db
|
||||
.into(db.localAssetEntity)
|
||||
.insertReturning(
|
||||
|
|
@ -200,14 +202,14 @@ class MediumRepositoryContext {
|
|||
name: Value(name ?? 'local_$id.jpg'),
|
||||
height: Value(height ?? _random.nextInt(1000)),
|
||||
width: Value(width ?? _random.nextInt(1000)),
|
||||
durationInSeconds: Value(durationInSeconds ?? 0),
|
||||
durationMs: Value(durationMs ?? 0),
|
||||
orientation: Value(orientation ?? 0),
|
||||
updatedAt: Value(updatedAt ?? DateTime.now()),
|
||||
updatedAt: Value(TestUtils.date(updatedAt)),
|
||||
checksum: _resolveUndefined(checksum, checksumOption, const Uuid().v4()),
|
||||
createdAt: Value(createdAt ?? DateTime.now()),
|
||||
createdAt: Value(TestUtils.date(createdAt)),
|
||||
type: Value(type ?? AssetType.image),
|
||||
isFavorite: Value(isFavorite ?? false),
|
||||
iCloudId: Value(iCloudId ?? const Uuid().v4()),
|
||||
iCloudId: Value(TestUtils.uuid(iCloudId)),
|
||||
adjustmentTime: _resolveUndefined(adjustmentTime, adjustmentTimeOption, DateTime.now()),
|
||||
latitude: Value(latitude ?? _random.nextDouble() * 180 - 90),
|
||||
longitude: Value(longitude ?? _random.nextDouble() * 360 - 180),
|
||||
|
|
@ -223,14 +225,14 @@ class MediumRepositoryContext {
|
|||
bool? isIosSharedAlbum,
|
||||
String? linkedRemoteAlbumId,
|
||||
}) {
|
||||
id = id ?? const Uuid().v4();
|
||||
id = TestUtils.uuid(id);
|
||||
return db
|
||||
.into(db.localAlbumEntity)
|
||||
.insertReturning(
|
||||
LocalAlbumEntityCompanion(
|
||||
id: Value(id),
|
||||
name: Value(name ?? 'local_album_$id'),
|
||||
updatedAt: Value(updatedAt ?? DateTime.now()),
|
||||
updatedAt: Value(TestUtils.date(updatedAt)),
|
||||
backupSelection: Value(backupSelection ?? BackupSelection.none),
|
||||
isIosSharedAlbum: Value(isIosSharedAlbum ?? false),
|
||||
linkedRemoteAlbumId: Value(linkedRemoteAlbumId),
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ void main() {
|
|||
test('ok', () {
|
||||
expect("1:02:33".toDuration(), const Duration(hours: 1, minutes: 2, seconds: 33));
|
||||
});
|
||||
test('fractional seconds', () {
|
||||
expect("0:00:00.500000".toDuration(), const Duration(milliseconds: 500));
|
||||
expect("0:00:01.250000".toDuration(), const Duration(seconds: 1, milliseconds: 250));
|
||||
expect("1:02:33.123456".toDuration(), const Duration(hours: 1, minutes: 2, seconds: 33, milliseconds: 123));
|
||||
});
|
||||
test('malformed', () {
|
||||
expect("".toDuration(), isNull);
|
||||
expect("1:2".toDuration(), isNull);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ abstract final class TestUtils {
|
|||
type: domain.AssetType.image,
|
||||
createdAt: DateTime(2024, 1, 1),
|
||||
updatedAt: DateTime(2024, 1, 1),
|
||||
durationInSeconds: 0,
|
||||
durationMs: 0,
|
||||
isFavorite: false,
|
||||
width: width,
|
||||
height: height,
|
||||
|
|
@ -81,7 +81,7 @@ abstract final class TestUtils {
|
|||
type: domain.AssetType.image,
|
||||
createdAt: DateTime(2024, 1, 1),
|
||||
updatedAt: DateTime(2024, 1, 1),
|
||||
durationInSeconds: 0,
|
||||
durationMs: 0,
|
||||
isFavorite: false,
|
||||
width: width,
|
||||
height: height,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
import 'package:immich_mobile/domain/models/album/local_album.model.dart';
|
||||
|
||||
import '../../utils.dart';
|
||||
|
||||
class LocalAlbumFactory {
|
||||
const LocalAlbumFactory();
|
||||
|
||||
static LocalAlbum create({
|
||||
String? id,
|
||||
String? name,
|
||||
DateTime? updatedAt,
|
||||
BackupSelection? backupSelection,
|
||||
bool? isIosSharedAlbum,
|
||||
String? linkedRemoteAlbumId,
|
||||
int? assetCount,
|
||||
}) {
|
||||
id = TestUtils.uuid(id);
|
||||
return LocalAlbum(
|
||||
id: id,
|
||||
name: name ?? 'local_album_$id',
|
||||
updatedAt: TestUtils.date(updatedAt),
|
||||
backupSelection: backupSelection ?? BackupSelection.none,
|
||||
isIosSharedAlbum: isIosSharedAlbum ?? false,
|
||||
linkedRemoteAlbumId: linkedRemoteAlbumId,
|
||||
assetCount: assetCount ?? 10,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
||||
|
||||
import '../../utils.dart';
|
||||
|
||||
class LocalAssetFactory {
|
||||
const LocalAssetFactory();
|
||||
|
||||
static LocalAsset create({String? id, String? name}) {
|
||||
id = TestUtils.uuid(id);
|
||||
|
||||
return LocalAsset(
|
||||
id: id,
|
||||
name: name ?? 'local_$id.jpg',
|
||||
type: AssetType.image,
|
||||
createdAt: TestUtils.yesterday(),
|
||||
updatedAt: TestUtils.now(),
|
||||
playbackStyle: AssetPlaybackStyle.image,
|
||||
isEdited: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
import 'package:immich_mobile/domain/models/album/local_album.model.dart';
|
||||
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
||||
import 'package:mocktail/mocktail.dart' as mocktail;
|
||||
|
||||
import '../domain/service.mock.dart';
|
||||
import '../infrastructure/repository.mock.dart';
|
||||
|
||||
class UnitMocks {
|
||||
final localAlbum = MockLocalAlbumRepository();
|
||||
final localAsset = MockDriftLocalAssetRepository();
|
||||
final trashedAsset = MockTrashedLocalAssetRepository();
|
||||
|
||||
final nativeApi = MockNativeSyncApi();
|
||||
|
||||
UnitMocks() {
|
||||
mocktail.registerFallbackValue(LocalAlbum(id: '', name: '', updatedAt: DateTime.now()));
|
||||
mocktail.registerFallbackValue(
|
||||
LocalAsset(
|
||||
id: '',
|
||||
name: '',
|
||||
type: AssetType.image,
|
||||
createdAt: DateTime.now(),
|
||||
updatedAt: DateTime.now(),
|
||||
playbackStyle: AssetPlaybackStyle.image,
|
||||
isEdited: false,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void reset() {
|
||||
mocktail.reset(localAlbum);
|
||||
mocktail.reset(localAsset);
|
||||
mocktail.reset(trashedAsset);
|
||||
mocktail.reset(nativeApi);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:immich_mobile/domain/models/album/local_album.model.dart';
|
||||
import 'package:immich_mobile/domain/services/hash.service.dart';
|
||||
import 'package:immich_mobile/platform/native_sync_api.g.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
|
||||
import '../factories/local_album_factory.dart';
|
||||
import '../factories/local_asset_factory.dart';
|
||||
import '../mocks.dart';
|
||||
|
||||
void main() {
|
||||
late HashService sut;
|
||||
final mocks = UnitMocks();
|
||||
|
||||
setUp(() {
|
||||
sut = HashService(
|
||||
localAlbumRepository: mocks.localAlbum,
|
||||
localAssetRepository: mocks.localAsset,
|
||||
nativeSyncApi: mocks.nativeApi,
|
||||
trashedLocalAssetRepository: mocks.trashedAsset,
|
||||
);
|
||||
|
||||
when(() => mocks.localAsset.reconcileHashesFromCloudId()).thenAnswer((_) async => {});
|
||||
when(() => mocks.localAsset.updateHashes(any())).thenAnswer((_) async => {});
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
mocks.reset();
|
||||
});
|
||||
|
||||
group('HashService', () {
|
||||
group('hashAssets', () {
|
||||
test('skips albums with no assets to hash', () async {
|
||||
final album = LocalAlbumFactory.create(assetCount: 0);
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => []);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verifyNever(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess')));
|
||||
});
|
||||
|
||||
test('skips empty batches', () async {
|
||||
final album = LocalAlbumFactory.create();
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => []);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verifyNever(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess')));
|
||||
});
|
||||
|
||||
test('processes assets when available', () async {
|
||||
final album = LocalAlbumFactory.create();
|
||||
final asset = LocalAssetFactory.create();
|
||||
final result = HashResult(assetId: asset.id, hash: 'test-hash');
|
||||
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]);
|
||||
when(() => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false)).thenAnswer((_) async => [result]);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verify(() => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false)).called(1);
|
||||
final captured =
|
||||
verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 1);
|
||||
expect(captured[asset.id], result.hash);
|
||||
});
|
||||
|
||||
test('handles failed hashes', () async {
|
||||
final album = LocalAlbumFactory.create();
|
||||
final asset = LocalAssetFactory.create();
|
||||
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]);
|
||||
when(
|
||||
() => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false),
|
||||
).thenAnswer((_) async => [HashResult(assetId: asset.id, error: 'Failed to hash')]);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
final captured =
|
||||
verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 0);
|
||||
});
|
||||
|
||||
test('handles null hash results', () async {
|
||||
final album = LocalAlbumFactory.create();
|
||||
final asset = LocalAssetFactory.create();
|
||||
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset]);
|
||||
when(
|
||||
() => mocks.nativeApi.hashAssets([asset.id], allowNetworkAccess: false),
|
||||
).thenAnswer((_) async => [HashResult(assetId: asset.id, hash: null)]);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
final captured =
|
||||
verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 0);
|
||||
});
|
||||
|
||||
test('batches by size limit', () async {
|
||||
const batchSize = 2;
|
||||
final sut = HashService(
|
||||
localAlbumRepository: mocks.localAlbum,
|
||||
localAssetRepository: mocks.localAsset,
|
||||
nativeSyncApi: mocks.nativeApi,
|
||||
batchSize: batchSize,
|
||||
trashedLocalAssetRepository: mocks.trashedAsset,
|
||||
);
|
||||
|
||||
final album = LocalAlbumFactory.create();
|
||||
final asset1 = LocalAssetFactory.create();
|
||||
final asset2 = LocalAssetFactory.create();
|
||||
final asset3 = LocalAssetFactory.create();
|
||||
|
||||
final capturedCalls = <List<String>>[];
|
||||
|
||||
when(() => mocks.localAsset.updateHashes(any())).thenAnswer((_) async => {});
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2, asset3]);
|
||||
when(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))).thenAnswer((
|
||||
invocation,
|
||||
) async {
|
||||
final assetIds = invocation.positionalArguments[0] as List<String>;
|
||||
capturedCalls.add(List<String>.from(assetIds));
|
||||
return assetIds.map((id) => HashResult(assetId: id, hash: '$id-hash')).toList();
|
||||
});
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
expect(capturedCalls.length, 2, reason: 'Should make exactly 2 calls to hashAssets');
|
||||
expect(capturedCalls[0], [asset1.id, asset2.id], reason: 'First call should batch the first two assets');
|
||||
expect(capturedCalls[1], [asset3.id], reason: 'Second call should have the remaining asset');
|
||||
|
||||
verify(() => mocks.localAsset.updateHashes(any())).called(2);
|
||||
});
|
||||
|
||||
test('handles mixed success and failure in batch', () async {
|
||||
final album = LocalAlbumFactory.create();
|
||||
final asset1 = LocalAssetFactory.create();
|
||||
final asset2 = LocalAssetFactory.create();
|
||||
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [album]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(album.id)).thenAnswer((_) async => [asset1, asset2]);
|
||||
when(() => mocks.nativeApi.hashAssets([asset1.id, asset2.id], allowNetworkAccess: false)).thenAnswer(
|
||||
(_) async => [
|
||||
HashResult(assetId: asset1.id, hash: 'asset1-hash'),
|
||||
HashResult(assetId: asset2.id, error: 'Failed to hash asset2'),
|
||||
],
|
||||
);
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
final captured =
|
||||
verify(() => mocks.localAsset.updateHashes(captureAny())).captured.first as Map<String, String>;
|
||||
expect(captured.length, 1);
|
||||
expect(captured[asset1.id], 'asset1-hash');
|
||||
});
|
||||
|
||||
test('uses allowNetworkAccess based on album backup selection', () async {
|
||||
final selectedAlbum = LocalAlbumFactory.create(backupSelection: BackupSelection.selected);
|
||||
final nonSelectedAlbum = LocalAlbumFactory.create(id: 'album2', backupSelection: BackupSelection.excluded);
|
||||
final asset1 = LocalAssetFactory.create();
|
||||
final asset2 = LocalAssetFactory.create();
|
||||
|
||||
when(() => mocks.localAlbum.getBackupAlbums()).thenAnswer((_) async => [selectedAlbum, nonSelectedAlbum]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(selectedAlbum.id)).thenAnswer((_) async => [asset1]);
|
||||
when(() => mocks.localAlbum.getAssetsToHash(nonSelectedAlbum.id)).thenAnswer((_) async => [asset2]);
|
||||
when(() => mocks.nativeApi.hashAssets(any(), allowNetworkAccess: any(named: 'allowNetworkAccess'))).thenAnswer((
|
||||
invocation,
|
||||
) async {
|
||||
final assetIds = invocation.positionalArguments[0] as List<String>;
|
||||
return assetIds.map((id) => HashResult(assetId: id, hash: '$id-hash')).toList();
|
||||
});
|
||||
|
||||
await sut.hashAssets();
|
||||
|
||||
verify(() => mocks.nativeApi.hashAssets([asset1.id], allowNetworkAccess: true)).called(1);
|
||||
verify(() => mocks.nativeApi.hashAssets([asset2.id], allowNetworkAccess: false)).called(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class TestUtils {
|
||||
static String uuid([String? id]) => id ?? const Uuid().v4();
|
||||
|
||||
static DateTime date([DateTime? date]) => date ?? DateTime.now();
|
||||
static DateTime now() => DateTime.now();
|
||||
static DateTime yesterday() => DateTime.now().subtract(const Duration(days: 1));
|
||||
static DateTime tomorrow() => DateTime.now().add(const Duration(days: 1));
|
||||
}
|
||||
|
|
@ -16348,7 +16348,6 @@
|
|||
"description": "Upload status",
|
||||
"enum": [
|
||||
"created",
|
||||
"replaced",
|
||||
"duplicate"
|
||||
],
|
||||
"type": "string"
|
||||
|
|
|
|||
|
|
@ -6899,7 +6899,6 @@ export enum Permission {
|
|||
}
|
||||
export enum AssetMediaStatus {
|
||||
Created = "created",
|
||||
Replaced = "replaced",
|
||||
Duplicate = "duplicate"
|
||||
}
|
||||
export enum AssetUploadAction {
|
||||
|
|
|
|||
|
|
@ -412,9 +412,6 @@ importers:
|
|||
'@socket.io/redis-adapter':
|
||||
specifier: ^8.3.0
|
||||
version: 8.3.0(socket.io-adapter@2.5.6)
|
||||
ajv:
|
||||
specifier: ^8.17.1
|
||||
version: 8.18.0
|
||||
archiver:
|
||||
specifier: ^7.0.0
|
||||
version: 7.0.1
|
||||
|
|
@ -523,9 +520,6 @@ importers:
|
|||
pg:
|
||||
specifier: ^8.11.3
|
||||
version: 8.20.0
|
||||
pg-connection-string:
|
||||
specifier: ^2.9.1
|
||||
version: 2.12.0
|
||||
picomatch:
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.4
|
||||
|
|
@ -689,9 +683,6 @@ importers:
|
|||
mock-fs:
|
||||
specifier: ^5.2.0
|
||||
version: 5.5.0
|
||||
node-gyp:
|
||||
specifier: ^12.0.0
|
||||
version: 12.2.0
|
||||
pngjs:
|
||||
specifier: ^7.0.0
|
||||
version: 7.0.0
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
"test": "vitest --config test/vitest.config.mjs",
|
||||
"test:cov": "vitest --config test/vitest.config.mjs --coverage",
|
||||
"test:medium": "vitest --config test/vitest.config.medium.mjs",
|
||||
"typeorm": "typeorm",
|
||||
"migrations:debug": "sql-tools -u ${DB_URL:-postgres://postgres:postgres@localhost:5432/immich} migrations generate --debug",
|
||||
"migrations:generate": "sql-tools -u ${DB_URL:-postgres://postgres:postgres@localhost:5432/immich} migrations generate",
|
||||
"migrations:create": "sql-tools -u ${DB_URL:-postgres://postgres:postgres@localhost:5432/immich} migrations create",
|
||||
|
|
@ -63,7 +62,6 @@
|
|||
"@react-email/components": "^1.0.0",
|
||||
"@react-email/render": "^2.0.0",
|
||||
"@socket.io/redis-adapter": "^8.3.0",
|
||||
"ajv": "^8.17.1",
|
||||
"archiver": "^7.0.0",
|
||||
"async-lock": "^1.4.0",
|
||||
"bcrypt": "^6.0.0",
|
||||
|
|
@ -96,11 +94,10 @@
|
|||
"nestjs-cls": "^6.0.0",
|
||||
"nestjs-kysely": "3.1.2",
|
||||
"nestjs-otel": "^7.0.0",
|
||||
"nodemailer": "^8.0.0",
|
||||
"nestjs-zod": "^5.3.0",
|
||||
"nodemailer": "^8.0.0",
|
||||
"openid-client": "^6.3.3",
|
||||
"pg": "^8.11.3",
|
||||
"pg-connection-string": "^2.9.1",
|
||||
"picomatch": "^4.0.2",
|
||||
"postgres": "3.4.8",
|
||||
"react": "^19.0.0",
|
||||
|
|
@ -157,7 +154,6 @@
|
|||
"eslint-plugin-unicorn": "^64.0.0",
|
||||
"globals": "^17.0.0",
|
||||
"mock-fs": "^5.2.0",
|
||||
"node-gyp": "^12.0.0",
|
||||
"pngjs": "^7.0.0",
|
||||
"prettier": "^3.7.4",
|
||||
"prettier-plugin-organize-imports": "^4.0.0",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { Duration } from 'luxon';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { SemVer } from 'semver';
|
||||
|
|
@ -52,9 +51,6 @@ const packageFile = join(basePath, '..', 'package.json');
|
|||
const { version } = JSON.parse(readFileSync(packageFile, 'utf8'));
|
||||
export const serverVersion = new SemVer(version);
|
||||
|
||||
export const AUDIT_LOG_MAX_DURATION = Duration.fromObject({ days: 100 });
|
||||
export const ONE_HOUR = Duration.fromObject({ hours: 1 });
|
||||
|
||||
export const citiesFile = 'cities500.txt';
|
||||
export const reverseGeocodeMaxDistance = 25_000;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import {
|
|||
import { AlbumTable } from 'src/schema/tables/album.table';
|
||||
import { AssetExifTable } from 'src/schema/tables/asset-exif.table';
|
||||
import { AssetTable } from 'src/schema/tables/asset.table';
|
||||
import { PluginActionTable, PluginFilterTable, PluginTable } from 'src/schema/tables/plugin.table';
|
||||
import { PluginActionTable, PluginFilterTable } from 'src/schema/tables/plugin.table';
|
||||
import { WorkflowActionTable, WorkflowFilterTable, WorkflowTable } from 'src/schema/tables/workflow.table';
|
||||
import { UserMetadataItem } from 'src/types';
|
||||
import type { ActionConfig, FilterConfig, JSONSchema } from 'src/types/plugin-schema.types';
|
||||
|
|
@ -277,8 +277,6 @@ export type AssetFace = {
|
|||
isVisible: boolean;
|
||||
};
|
||||
|
||||
export type Plugin = Selectable<PluginTable>;
|
||||
|
||||
export type PluginFilter = Selectable<PluginFilterTable> & {
|
||||
methodName: string;
|
||||
title: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { BeforeUpdateTrigger, Column, ColumnOptions } from '@immich/sql-tools';
|
||||
import { SetMetadata, applyDecorators } from '@nestjs/common';
|
||||
import { ApiOperation, ApiOperationOptions, ApiProperty, ApiPropertyOptions, ApiTags } from '@nestjs/swagger';
|
||||
import { ApiOperation, ApiOperationOptions, ApiTags } from '@nestjs/swagger';
|
||||
import _ from 'lodash';
|
||||
import { ApiCustomExtension, ApiTag, ImmichWorker, JobName, MetadataKey, QueueName } from 'src/enum';
|
||||
import { EmitEvent } from 'src/repositories/event.repository';
|
||||
|
|
@ -172,17 +172,6 @@ export const Endpoint = ({ history, ...options }: EndpointOptions) => {
|
|||
return applyDecorators(...decorators);
|
||||
};
|
||||
|
||||
export type PropertyOptions = ApiPropertyOptions & { history?: HistoryBuilder };
|
||||
export const Property = ({ history, ...options }: PropertyOptions) => {
|
||||
const extensions = history?.getExtensions() ?? {};
|
||||
|
||||
if (history?.isDeprecated()) {
|
||||
options.deprecated = true;
|
||||
}
|
||||
|
||||
return ApiProperty({ ...options, ...extensions });
|
||||
};
|
||||
|
||||
type HistoryEntry = {
|
||||
version: string;
|
||||
state: ApiState | 'Added' | 'Updated';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import z from 'zod';
|
|||
|
||||
export enum AssetMediaStatus {
|
||||
CREATED = 'created',
|
||||
REPLACED = 'replaced',
|
||||
DUPLICATE = 'duplicate',
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ export enum AuthType {
|
|||
OAuth = 'oauth',
|
||||
}
|
||||
|
||||
export const AuthTypeSchema = z.enum(AuthType).describe('Auth type').meta({ id: 'AuthType' });
|
||||
|
||||
export enum ImmichCookie {
|
||||
AccessToken = 'immich_access_token',
|
||||
MaintenanceToken = 'immich_maintenance_token',
|
||||
|
|
@ -17,8 +15,6 @@ export enum ImmichCookie {
|
|||
OAuthCodeVerifier = 'immich_oauth_code_verifier',
|
||||
}
|
||||
|
||||
export const ImmichCookieSchema = z.enum(ImmichCookie).describe('Immich cookie').meta({ id: 'ImmichCookie' });
|
||||
|
||||
export enum ImmichHeader {
|
||||
ApiKey = 'x-api-key',
|
||||
UserToken = 'x-immich-user-token',
|
||||
|
|
@ -29,8 +25,6 @@ export enum ImmichHeader {
|
|||
Cid = 'x-immich-cid',
|
||||
}
|
||||
|
||||
export const ImmichHeaderSchema = z.enum(ImmichHeader).describe('Immich header').meta({ id: 'ImmichHeader' });
|
||||
|
||||
export enum ImmichQuery {
|
||||
SharedLinkKey = 'key',
|
||||
SharedLinkSlug = 'slug',
|
||||
|
|
@ -38,8 +32,6 @@ export enum ImmichQuery {
|
|||
SessionKey = 'sessionKey',
|
||||
}
|
||||
|
||||
export const ImmichQuerySchema = z.enum(ImmichQuery).describe('Immich query').meta({ id: 'ImmichQuery' });
|
||||
|
||||
export enum AssetType {
|
||||
Image = 'IMAGE',
|
||||
Video = 'VIDEO',
|
||||
|
|
@ -56,11 +48,6 @@ export enum ChecksumAlgorithm {
|
|||
sha1Path = 'sha1-path',
|
||||
}
|
||||
|
||||
export const ChecksumAlgorithmSchema = z
|
||||
.enum(ChecksumAlgorithm)
|
||||
.describe('Checksum algorithm')
|
||||
.meta({ id: 'ChecksumAlgorithmEnum' });
|
||||
|
||||
export enum AssetFileType {
|
||||
/**
|
||||
* An full/large-size image extracted/converted from RAW photos
|
||||
|
|
@ -72,8 +59,6 @@ export enum AssetFileType {
|
|||
EncodedVideo = 'encoded_video',
|
||||
}
|
||||
|
||||
export const AssetFileTypeSchema = z.enum(AssetFileType).describe('Asset file type').meta({ id: 'AssetFileType' });
|
||||
|
||||
export enum AlbumUserRole {
|
||||
Editor = 'editor',
|
||||
Viewer = 'viewer',
|
||||
|
|
@ -313,8 +298,6 @@ export enum Permission {
|
|||
AdminAuthUnlinkAll = 'adminAuth.unlinkAll',
|
||||
}
|
||||
|
||||
export const PermissionSchema = z.enum(Permission).describe('Permission').meta({ id: 'Permission' });
|
||||
|
||||
export enum SharedLinkType {
|
||||
Album = 'ALBUM',
|
||||
|
||||
|
|
@ -351,11 +334,6 @@ export enum SystemMetadataKey {
|
|||
License = 'license',
|
||||
}
|
||||
|
||||
export const SystemMetadataKeySchema = z
|
||||
.enum(SystemMetadataKey)
|
||||
.describe('System metadata key')
|
||||
.meta({ id: 'SystemMetadataKey' });
|
||||
|
||||
export enum UserMetadataKey {
|
||||
Preferences = 'preferences',
|
||||
License = 'license',
|
||||
|
|
@ -371,11 +349,6 @@ export enum AssetMetadataKey {
|
|||
MobileApp = 'mobile-app',
|
||||
}
|
||||
|
||||
export const AssetMetadataKeySchema = z
|
||||
.enum(AssetMetadataKey)
|
||||
.describe('Asset metadata key')
|
||||
.meta({ id: 'AssetMetadataKey' });
|
||||
|
||||
export enum UserAvatarColor {
|
||||
Primary = 'primary',
|
||||
Pink = 'pink',
|
||||
|
|
@ -408,8 +381,6 @@ export enum AssetStatus {
|
|||
Deleted = 'deleted',
|
||||
}
|
||||
|
||||
export const AssetStatusSchema = z.enum(AssetStatus).describe('Asset status').meta({ id: 'AssetStatus' });
|
||||
|
||||
export enum SourceType {
|
||||
MachineLearning = 'machine-learning',
|
||||
Exif = 'exif',
|
||||
|
|
@ -434,20 +405,14 @@ export enum AssetPathType {
|
|||
EncodedVideo = 'encoded_video',
|
||||
}
|
||||
|
||||
export const AssetPathTypeSchema = z.enum(AssetPathType).describe('Asset path type').meta({ id: 'AssetPathType' });
|
||||
|
||||
export enum PersonPathType {
|
||||
Face = 'face',
|
||||
}
|
||||
|
||||
export const PersonPathTypeSchema = z.enum(PersonPathType).describe('Person path type').meta({ id: 'PersonPathType' });
|
||||
|
||||
export enum UserPathType {
|
||||
Profile = 'profile',
|
||||
}
|
||||
|
||||
export const UserPathTypeSchema = z.enum(UserPathType).describe('User path type').meta({ id: 'UserPathType' });
|
||||
|
||||
export type PathType = AssetFileType | AssetPathType | PersonPathType | UserPathType;
|
||||
|
||||
export enum TranscodePolicy {
|
||||
|
|
@ -470,11 +435,6 @@ export enum TranscodeTarget {
|
|||
All = 'ALL',
|
||||
}
|
||||
|
||||
export const TranscodeTargetSchema = z
|
||||
.enum(TranscodeTarget)
|
||||
.describe('Transcode target')
|
||||
.meta({ id: 'TranscodeTarget' });
|
||||
|
||||
export enum VideoCodec {
|
||||
H264 = 'h264',
|
||||
Hevc = 'hevc',
|
||||
|
|
@ -556,11 +516,6 @@ export enum RawExtractedFormat {
|
|||
Jxl = 'jxl',
|
||||
}
|
||||
|
||||
export const RawExtractedFormatSchema = z
|
||||
.enum(RawExtractedFormat)
|
||||
.describe('Raw extracted format')
|
||||
.meta({ id: 'RawExtractedFormat' });
|
||||
|
||||
export enum LogLevel {
|
||||
Verbose = 'verbose',
|
||||
Debug = 'debug',
|
||||
|
|
@ -586,38 +541,25 @@ export enum ApiCustomExtension {
|
|||
State = 'x-immich-state',
|
||||
}
|
||||
|
||||
export const ApiCustomExtensionSchema = z
|
||||
.enum(ApiCustomExtension)
|
||||
.describe('API custom extension')
|
||||
.meta({ id: 'ApiCustomExtension' });
|
||||
|
||||
export enum MetadataKey {
|
||||
AuthRoute = 'auth_route',
|
||||
AdminRoute = 'admin_route',
|
||||
SharedRoute = 'shared_route',
|
||||
ApiKeySecurity = 'api_key',
|
||||
EventConfig = 'event_config',
|
||||
JobConfig = 'job_config',
|
||||
TelemetryEnabled = 'telemetry_enabled',
|
||||
}
|
||||
|
||||
export const MetadataKeySchema = z.enum(MetadataKey).describe('Metadata key').meta({ id: 'MetadataKey' });
|
||||
|
||||
export enum RouteKey {
|
||||
Asset = 'assets',
|
||||
User = 'users',
|
||||
}
|
||||
|
||||
export const RouteKeySchema = z.enum(RouteKey).describe('Route key').meta({ id: 'RouteKey' });
|
||||
|
||||
export enum CacheControl {
|
||||
PrivateWithCache = 'private_with_cache',
|
||||
PrivateWithoutCache = 'private_without_cache',
|
||||
None = 'none',
|
||||
}
|
||||
|
||||
export const CacheControlSchema = z.enum(CacheControl).describe('Cache control').meta({ id: 'CacheControl' });
|
||||
|
||||
export enum ImmichEnvironment {
|
||||
Development = 'development',
|
||||
Testing = 'testing',
|
||||
|
|
@ -635,8 +577,6 @@ export enum ImmichWorker {
|
|||
Microservices = 'microservices',
|
||||
}
|
||||
|
||||
export const ImmichWorkerSchema = z.enum(ImmichWorker).describe('Immich worker').meta({ id: 'ImmichWorker' });
|
||||
|
||||
export enum ImmichTelemetry {
|
||||
Host = 'host',
|
||||
Api = 'api',
|
||||
|
|
@ -645,11 +585,6 @@ export enum ImmichTelemetry {
|
|||
Job = 'job',
|
||||
}
|
||||
|
||||
export const ImmichTelemetrySchema = z
|
||||
.enum(ImmichTelemetry)
|
||||
.describe('Immich telemetry')
|
||||
.meta({ id: 'ImmichTelemetry' });
|
||||
|
||||
export enum ExifOrientation {
|
||||
Horizontal = 1,
|
||||
MirrorHorizontal = 2,
|
||||
|
|
@ -661,11 +596,6 @@ export enum ExifOrientation {
|
|||
Rotate270CW = 8,
|
||||
}
|
||||
|
||||
export const ExifOrientationSchema = z
|
||||
.enum(ExifOrientation)
|
||||
.describe('EXIF orientation')
|
||||
.meta({ id: 'ExifOrientation' });
|
||||
|
||||
export enum DatabaseExtension {
|
||||
Cube = 'cube',
|
||||
EarthDistance = 'earthdistance',
|
||||
|
|
@ -674,11 +604,6 @@ export enum DatabaseExtension {
|
|||
VectorChord = 'vchord',
|
||||
}
|
||||
|
||||
export const DatabaseExtensionSchema = z
|
||||
.enum(DatabaseExtension)
|
||||
.describe('Database extension')
|
||||
.meta({ id: 'DatabaseExtension' });
|
||||
|
||||
export enum BootstrapEventPriority {
|
||||
// Database service should be initialized before anything else, most other services need database access
|
||||
DatabaseService = -200,
|
||||
|
|
@ -690,11 +615,6 @@ export enum BootstrapEventPriority {
|
|||
SystemConfig = 100,
|
||||
}
|
||||
|
||||
export const BootstrapEventPrioritySchema = z
|
||||
.enum(BootstrapEventPriority)
|
||||
.describe('Bootstrap event priority')
|
||||
.meta({ id: 'BootstrapEventPriority' });
|
||||
|
||||
export enum QueueName {
|
||||
ThumbnailGeneration = 'thumbnailGeneration',
|
||||
MetadataExtraction = 'metadataExtraction',
|
||||
|
|
@ -833,21 +753,15 @@ export enum JobStatus {
|
|||
Skipped = 'skipped',
|
||||
}
|
||||
|
||||
export const JobStatusSchema = z.enum(JobStatus).describe('Job status').meta({ id: 'JobStatus' });
|
||||
|
||||
export enum QueueCleanType {
|
||||
Failed = 'failed',
|
||||
}
|
||||
|
||||
export const QueueCleanTypeSchema = z.enum(QueueCleanType).describe('Queue clean type').meta({ id: 'QueueCleanType' });
|
||||
|
||||
export enum VectorIndex {
|
||||
Clip = 'clip_index',
|
||||
Face = 'face_index',
|
||||
}
|
||||
|
||||
export const VectorIndexSchema = z.enum(VectorIndex).describe('Vector index').meta({ id: 'VectorIndex' });
|
||||
|
||||
export enum DatabaseLock {
|
||||
GeodataImport = 100,
|
||||
Migrations = 200,
|
||||
|
|
@ -865,8 +779,6 @@ export enum DatabaseLock {
|
|||
VersionCheck = 800,
|
||||
}
|
||||
|
||||
export const DatabaseLockSchema = z.enum(DatabaseLock).describe('Database lock').meta({ id: 'DatabaseLock' });
|
||||
|
||||
export enum MaintenanceAction {
|
||||
Start = 'start',
|
||||
End = 'end',
|
||||
|
|
@ -883,8 +795,6 @@ export enum ExitCode {
|
|||
AppRestart = 7,
|
||||
}
|
||||
|
||||
export const ExitCodeSchema = z.enum(ExitCode).describe('Exit code').meta({ id: 'ExitCode' });
|
||||
|
||||
export enum SyncRequestType {
|
||||
AlbumsV1 = 'AlbumsV1',
|
||||
AlbumUsersV1 = 'AlbumUsersV1',
|
||||
|
|
@ -1043,8 +953,6 @@ export enum CronJob {
|
|||
VersionCheck = 'VersionCheck',
|
||||
}
|
||||
|
||||
export const CronJobSchema = z.enum(CronJob).describe('Cron job').meta({ id: 'CronJob' });
|
||||
|
||||
export enum ApiTag {
|
||||
Activities = 'Activities',
|
||||
Albums = 'Albums',
|
||||
|
|
@ -1085,8 +993,6 @@ export enum ApiTag {
|
|||
Workflows = 'Workflows',
|
||||
}
|
||||
|
||||
export const ApiTagSchema = z.enum(ApiTag).describe('API tag').meta({ id: 'ApiTag' });
|
||||
|
||||
export enum PluginContext {
|
||||
Asset = 'asset',
|
||||
Album = 'album',
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ where
|
|||
'%.jp2',
|
||||
'%.jpe',
|
||||
'%.jxl',
|
||||
'%.mpo',
|
||||
'%.svg',
|
||||
'%.tif',
|
||||
'%.tiff'
|
||||
|
|
|
|||
|
|
@ -33,12 +33,6 @@ export interface ReverseGeocodeResult {
|
|||
city: string | null;
|
||||
}
|
||||
|
||||
export interface MapMarker extends ReverseGeocodeResult {
|
||||
id: string;
|
||||
lat: number;
|
||||
lon: number;
|
||||
}
|
||||
|
||||
interface MapDB extends DB {
|
||||
geodata_places_tmp: GeodataPlacesTable;
|
||||
naturalearth_countries_tmp: NaturalEarthCountriesTable;
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ const validImages = [
|
|||
'.jxl',
|
||||
'.k25',
|
||||
'.kdc',
|
||||
'.mpo',
|
||||
'.mrw',
|
||||
'.nef',
|
||||
'.orf',
|
||||
|
|
|
|||
|
|
@ -65,13 +65,8 @@ export interface DecodeToBufferOptions extends DecodeImageOptions {
|
|||
}
|
||||
|
||||
export type GenerateThumbnailOptions = Pick<ImageOptions, 'format' | 'quality' | 'progressive'> & DecodeToBufferOptions;
|
||||
|
||||
export type GenerateThumbnailFromBufferOptions = GenerateThumbnailOptions & { raw: RawImageInfo };
|
||||
|
||||
export type GenerateThumbhashOptions = DecodeImageOptions;
|
||||
|
||||
export type GenerateThumbhashFromBufferOptions = GenerateThumbhashOptions & { raw: RawImageInfo };
|
||||
|
||||
export interface GenerateThumbnailsOptions {
|
||||
colorspace: string;
|
||||
preview?: ImageOptions;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ import { SystemMetadataRepository } from 'src/repositories/system-metadata.repos
|
|||
import { DeepPartial } from 'src/types';
|
||||
import { getKeysDeep, unsetDeep } from 'src/utils/misc';
|
||||
|
||||
export type SystemConfigValidator = (config: SystemConfig, newConfig: SystemConfig) => void | Promise<void>;
|
||||
|
||||
type RepoDeps = {
|
||||
configRepo: ConfigRepository;
|
||||
metadataRepo: SystemMetadataRepository;
|
||||
|
|
|
|||
|
|
@ -1,60 +1,11 @@
|
|||
import { createAdapter } from '@socket.io/redis-adapter';
|
||||
import Redis from 'ioredis';
|
||||
import { SignJWT } from 'jose';
|
||||
import { randomBytes } from 'node:crypto';
|
||||
import { join } from 'node:path';
|
||||
import { Server as SocketIO } from 'socket.io';
|
||||
import { StorageCore } from 'src/cores/storage.core';
|
||||
import { MaintenanceAuthDto, MaintenanceDetectInstallResponseDto } from 'src/dtos/maintenance.dto';
|
||||
import { StorageFolder } from 'src/enum';
|
||||
import { ConfigRepository } from 'src/repositories/config.repository';
|
||||
import { AppRestartEvent } from 'src/repositories/event.repository';
|
||||
import { StorageRepository } from 'src/repositories/storage.repository';
|
||||
|
||||
export function sendOneShotAppRestart(state: AppRestartEvent): void {
|
||||
const server = new SocketIO();
|
||||
const { redis } = new ConfigRepository().getEnv();
|
||||
const pubClient = new Redis(redis);
|
||||
const subClient = pubClient.duplicate();
|
||||
server.adapter(createAdapter(pubClient, subClient));
|
||||
|
||||
/**
|
||||
* Keep trying until we manage to stop Immich
|
||||
*
|
||||
* Sometimes there appear to be communication
|
||||
* issues between to the other servers.
|
||||
*
|
||||
* This issue only occurs with this method.
|
||||
*/
|
||||
async function tryTerminate() {
|
||||
while (true) {
|
||||
try {
|
||||
const responses = await server.serverSideEmitWithAck('AppRestart', state);
|
||||
if (responses.length > 0) {
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
console.error('Encountered an error while telling Immich to stop.');
|
||||
}
|
||||
|
||||
console.info(
|
||||
"\nIt doesn't appear that Immich stopped, trying again in a moment.\nIf Immich is already not running, you can ignore this error.",
|
||||
);
|
||||
|
||||
await new Promise((r) => setTimeout(r, 1e3));
|
||||
}
|
||||
}
|
||||
|
||||
// => corresponds to notification.service.ts#onAppRestart
|
||||
server.emit('AppRestartV1', state, () => {
|
||||
void tryTerminate().finally(() => {
|
||||
pubClient.disconnect();
|
||||
subClient.disconnect();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export async function createMaintenanceLoginUrl(
|
||||
baseUrl: string,
|
||||
auth: MaintenanceAuthDto,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ describe('mimeTypes', () => {
|
|||
{ mimetype: 'image/jpeg', extension: '.jpe' },
|
||||
{ mimetype: 'image/jpeg', extension: '.jpeg' },
|
||||
{ mimetype: 'image/jpeg', extension: '.jpg' },
|
||||
{ mimetype: 'image/jpeg', extension: '.mpo' },
|
||||
{ mimetype: 'image/jxl', extension: '.jxl' },
|
||||
{ mimetype: 'image/k25', extension: '.k25' },
|
||||
{ mimetype: 'image/kdc', extension: '.kdc' },
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ const webUnsupportedImage = {
|
|||
'.jp2': ['image/jp2'],
|
||||
'.jpe': ['image/jpeg'],
|
||||
'.jxl': ['image/jxl'],
|
||||
'.mpo': ['image/jpeg'],
|
||||
'.svg': ['image/svg'],
|
||||
'.tif': ['image/tiff'],
|
||||
'.tiff': ['image/tiff'],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { MapAsset } from 'src/dtos/asset-response.dto';
|
||||
import { SharedLinkResponseDto } from 'src/dtos/shared-link.dto';
|
||||
import { SharedLinkType } from 'src/enum';
|
||||
import { AssetFactory } from 'test/factories/asset.factory';
|
||||
import { authStub } from 'test/fixtures/auth.stub';
|
||||
|
|
@ -70,23 +69,6 @@ export const sharedLinkStub = {
|
|||
album: null,
|
||||
slug: null,
|
||||
}),
|
||||
readonlyNoExif: Object.freeze({
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
key: sharedLinkBytes,
|
||||
type: SharedLinkType.Individual,
|
||||
createdAt: today,
|
||||
expiresAt: tomorrow,
|
||||
allowUpload: false,
|
||||
allowDownload: false,
|
||||
showExif: false,
|
||||
description: null,
|
||||
password: null,
|
||||
assets: [],
|
||||
albumId: null,
|
||||
album: null,
|
||||
slug: null,
|
||||
}),
|
||||
passwordRequired: Object.freeze({
|
||||
id: '123',
|
||||
userId: authStub.admin.user.id,
|
||||
|
|
@ -105,37 +87,3 @@ export const sharedLinkStub = {
|
|||
album: null,
|
||||
}),
|
||||
};
|
||||
|
||||
export const sharedLinkResponseStub = {
|
||||
valid: Object.freeze<SharedLinkResponseDto>({
|
||||
allowDownload: true,
|
||||
allowUpload: true,
|
||||
assets: [],
|
||||
createdAt: today,
|
||||
description: null,
|
||||
password: null,
|
||||
expiresAt: tomorrow,
|
||||
id: '123',
|
||||
key: sharedLinkBytes.toString('base64url'),
|
||||
showMetadata: true,
|
||||
type: SharedLinkType.Album,
|
||||
userId: 'admin_id',
|
||||
slug: null,
|
||||
}),
|
||||
expired: Object.freeze<SharedLinkResponseDto>({
|
||||
album: undefined,
|
||||
allowDownload: true,
|
||||
allowUpload: true,
|
||||
assets: [],
|
||||
createdAt: today,
|
||||
description: null,
|
||||
password: null,
|
||||
expiresAt: yesterday,
|
||||
id: '123',
|
||||
key: sharedLinkBytes.toString('base64url'),
|
||||
showMetadata: true,
|
||||
type: SharedLinkType.Album,
|
||||
userId: 'admin_id',
|
||||
slug: null,
|
||||
}),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -67,48 +67,3 @@ export const errorDto = {
|
|||
correlationId: expect.any(String),
|
||||
},
|
||||
};
|
||||
|
||||
export const signupResponseDto = {
|
||||
admin: {
|
||||
avatarColor: expect.any(String),
|
||||
id: expect.any(String),
|
||||
name: 'Immich Admin',
|
||||
email: 'admin@immich.cloud',
|
||||
storageLabel: 'admin',
|
||||
profileImagePath: '',
|
||||
// why? lol
|
||||
shouldChangePassword: true,
|
||||
isAdmin: true,
|
||||
createdAt: expect.any(String),
|
||||
updatedAt: expect.any(String),
|
||||
deletedAt: null,
|
||||
oauthId: '',
|
||||
quotaUsageInBytes: 0,
|
||||
quotaSizeInBytes: null,
|
||||
status: 'active',
|
||||
license: null,
|
||||
profileChangedAt: expect.any(String),
|
||||
},
|
||||
};
|
||||
|
||||
export const loginResponseDto = {
|
||||
admin: {
|
||||
accessToken: expect.any(String),
|
||||
name: 'Immich Admin',
|
||||
isAdmin: true,
|
||||
profileImagePath: '',
|
||||
shouldChangePassword: true,
|
||||
userEmail: 'admin@immich.cloud',
|
||||
userId: expect.any(String),
|
||||
},
|
||||
};
|
||||
export const deviceDto = {
|
||||
current: {
|
||||
id: expect.any(String),
|
||||
createdAt: expect.any(String),
|
||||
updatedAt: expect.any(String),
|
||||
current: true,
|
||||
deviceOS: '',
|
||||
deviceType: '',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -531,43 +531,6 @@ export const mockDuplex =
|
|||
return duplex;
|
||||
};
|
||||
|
||||
export const mockFork = vitest.fn((exitCode: number, stdout: string, stderr: string, error?: unknown) => {
|
||||
const stdoutStream = new Readable({
|
||||
read() {
|
||||
this.push(stdout); // write mock data to stdout
|
||||
this.push(null); // end stream
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
stdout: stdoutStream,
|
||||
stderr: new Readable({
|
||||
read() {
|
||||
this.push(stderr); // write mock data to stderr
|
||||
this.push(null); // end stream
|
||||
},
|
||||
}),
|
||||
stdin: new Writable({
|
||||
write(chunk, encoding, callback) {
|
||||
callback();
|
||||
},
|
||||
}),
|
||||
exitCode,
|
||||
on: vitest.fn((event, callback: any) => {
|
||||
if (event === 'close') {
|
||||
stdoutStream.once('end', () => callback(0));
|
||||
}
|
||||
if (event === 'error' && error) {
|
||||
stdoutStream.once('end', () => callback(error));
|
||||
}
|
||||
if (event === 'exit') {
|
||||
stdoutStream.once('end', () => callback(exitCode));
|
||||
}
|
||||
}),
|
||||
kill: vitest.fn(),
|
||||
} as unknown as ChildProcessWithoutNullStreams;
|
||||
});
|
||||
|
||||
export async function* makeStream<T>(items: T[] = []): AsyncIterableIterator<T> {
|
||||
for (const item of items) {
|
||||
await Promise.resolve();
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue