mirror of
https://github.com/immich-app/immich.git
synced 2025-12-10 07:05:29 -05:00
rename cloud id
This commit is contained in:
parent
84fcbd4df8
commit
89bb0ca0c9
2
mobile/drift_schemas/main/drift_schema_v11.json
generated
2
mobile/drift_schemas/main/drift_schema_v11.json
generated
File diff suppressed because one or more lines are too long
@ -45,7 +45,7 @@ Future<void> syncCloudIds(ProviderContainer ref) async {
|
|||||||
Future<void> _populateCloudIds(Drift drift) async {
|
Future<void> _populateCloudIds(Drift drift) async {
|
||||||
final query = drift.localAssetEntity.selectOnly()
|
final query = drift.localAssetEntity.selectOnly()
|
||||||
..addColumns([drift.localAssetEntity.id])
|
..addColumns([drift.localAssetEntity.id])
|
||||||
..where(drift.localAssetEntity.cloudId.isNull());
|
..where(drift.localAssetEntity.iCloudId.isNull());
|
||||||
final ids = await query.map((row) => row.read(drift.localAssetEntity.id)!).get();
|
final ids = await query.map((row) => row.read(drift.localAssetEntity.id)!).get();
|
||||||
final cloudMapping = await NativeSyncApi().getCloudIdForAssetIds(ids);
|
final cloudMapping = await NativeSyncApi().getCloudIdForAssetIds(ids);
|
||||||
await DriftLocalAlbumRepository(drift).updateCloudMapping(cloudMapping);
|
await DriftLocalAlbumRepository(drift).updateCloudMapping(cloudMapping);
|
||||||
@ -63,20 +63,20 @@ Future<List<_CloudIdMapping>> _fetchCloudIdMappings(Drift drift, String userId)
|
|||||||
),
|
),
|
||||||
leftOuterJoin(
|
leftOuterJoin(
|
||||||
drift.remoteAssetCloudIdEntity,
|
drift.remoteAssetCloudIdEntity,
|
||||||
drift.localAssetEntity.cloudId.equalsExp(drift.remoteAssetCloudIdEntity.cloudId),
|
drift.localAssetEntity.iCloudId.equalsExp(drift.remoteAssetCloudIdEntity.cloudId),
|
||||||
useColumns: false,
|
useColumns: false,
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
..addColumns([drift.remoteAssetEntity.id, drift.localAssetEntity.cloudId])
|
..addColumns([drift.remoteAssetEntity.id, drift.localAssetEntity.iCloudId])
|
||||||
..where(
|
..where(
|
||||||
drift.localAssetEntity.id.isNotNull() &
|
drift.localAssetEntity.id.isNotNull() &
|
||||||
drift.localAssetEntity.cloudId.isNotNull() &
|
drift.localAssetEntity.iCloudId.isNotNull() &
|
||||||
drift.remoteAssetEntity.ownerId.equals(userId) &
|
drift.remoteAssetEntity.ownerId.equals(userId) &
|
||||||
drift.remoteAssetCloudIdEntity.cloudId.isNull(),
|
drift.remoteAssetCloudIdEntity.cloudId.isNull(),
|
||||||
);
|
);
|
||||||
return query
|
return query
|
||||||
.map(
|
.map(
|
||||||
(row) => (assetId: row.read(drift.remoteAssetEntity.id)!, cloudId: row.read(drift.localAssetEntity.cloudId)!),
|
(row) => (assetId: row.read(drift.remoteAssetEntity.id)!, cloudId: row.read(drift.localAssetEntity.iCloudId)!),
|
||||||
)
|
)
|
||||||
.get();
|
.get();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class LocalAssetEntity extends Table with DriftDefaultsMixin, AssetEntityMixin {
|
|||||||
|
|
||||||
IntColumn get orientation => integer().withDefault(const Constant(0))();
|
IntColumn get orientation => integer().withDefault(const Constant(0))();
|
||||||
|
|
||||||
TextColumn get cloudId => text().nullable()();
|
TextColumn get iCloudId => text().nullable()();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Set<Column> get primaryKey => {id};
|
Set<Column> get primaryKey => {id};
|
||||||
@ -37,6 +37,6 @@ extension LocalAssetEntityDataDomainExtension on LocalAssetEntityData {
|
|||||||
width: width,
|
width: width,
|
||||||
remoteId: null,
|
remoteId: null,
|
||||||
orientation: orientation,
|
orientation: orientation,
|
||||||
cloudId: cloudId,
|
cloudId: iCloudId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ typedef $$LocalAssetEntityTableCreateCompanionBuilder =
|
|||||||
i0.Value<String?> checksum,
|
i0.Value<String?> checksum,
|
||||||
i0.Value<bool> isFavorite,
|
i0.Value<bool> isFavorite,
|
||||||
i0.Value<int> orientation,
|
i0.Value<int> orientation,
|
||||||
i0.Value<String?> cloudId,
|
i0.Value<String?> iCloudId,
|
||||||
});
|
});
|
||||||
typedef $$LocalAssetEntityTableUpdateCompanionBuilder =
|
typedef $$LocalAssetEntityTableUpdateCompanionBuilder =
|
||||||
i1.LocalAssetEntityCompanion Function({
|
i1.LocalAssetEntityCompanion Function({
|
||||||
@ -36,7 +36,7 @@ typedef $$LocalAssetEntityTableUpdateCompanionBuilder =
|
|||||||
i0.Value<String?> checksum,
|
i0.Value<String?> checksum,
|
||||||
i0.Value<bool> isFavorite,
|
i0.Value<bool> isFavorite,
|
||||||
i0.Value<int> orientation,
|
i0.Value<int> orientation,
|
||||||
i0.Value<String?> cloudId,
|
i0.Value<String?> iCloudId,
|
||||||
});
|
});
|
||||||
|
|
||||||
class $$LocalAssetEntityTableFilterComposer
|
class $$LocalAssetEntityTableFilterComposer
|
||||||
@ -104,8 +104,8 @@ class $$LocalAssetEntityTableFilterComposer
|
|||||||
builder: (column) => i0.ColumnFilters(column),
|
builder: (column) => i0.ColumnFilters(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
i0.ColumnFilters<String> get cloudId => $composableBuilder(
|
i0.ColumnFilters<String> get iCloudId => $composableBuilder(
|
||||||
column: $table.cloudId,
|
column: $table.iCloudId,
|
||||||
builder: (column) => i0.ColumnFilters(column),
|
builder: (column) => i0.ColumnFilters(column),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -174,8 +174,8 @@ class $$LocalAssetEntityTableOrderingComposer
|
|||||||
builder: (column) => i0.ColumnOrderings(column),
|
builder: (column) => i0.ColumnOrderings(column),
|
||||||
);
|
);
|
||||||
|
|
||||||
i0.ColumnOrderings<String> get cloudId => $composableBuilder(
|
i0.ColumnOrderings<String> get iCloudId => $composableBuilder(
|
||||||
column: $table.cloudId,
|
column: $table.iCloudId,
|
||||||
builder: (column) => i0.ColumnOrderings(column),
|
builder: (column) => i0.ColumnOrderings(column),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -228,8 +228,8 @@ class $$LocalAssetEntityTableAnnotationComposer
|
|||||||
builder: (column) => column,
|
builder: (column) => column,
|
||||||
);
|
);
|
||||||
|
|
||||||
i0.GeneratedColumn<String> get cloudId =>
|
i0.GeneratedColumn<String> get iCloudId =>
|
||||||
$composableBuilder(column: $table.cloudId, builder: (column) => column);
|
$composableBuilder(column: $table.iCloudId, builder: (column) => column);
|
||||||
}
|
}
|
||||||
|
|
||||||
class $$LocalAssetEntityTableTableManager
|
class $$LocalAssetEntityTableTableManager
|
||||||
@ -283,7 +283,7 @@ class $$LocalAssetEntityTableTableManager
|
|||||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||||
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
||||||
i0.Value<int> orientation = const i0.Value.absent(),
|
i0.Value<int> orientation = const i0.Value.absent(),
|
||||||
i0.Value<String?> cloudId = const i0.Value.absent(),
|
i0.Value<String?> iCloudId = const i0.Value.absent(),
|
||||||
}) => i1.LocalAssetEntityCompanion(
|
}) => i1.LocalAssetEntityCompanion(
|
||||||
name: name,
|
name: name,
|
||||||
type: type,
|
type: type,
|
||||||
@ -296,7 +296,7 @@ class $$LocalAssetEntityTableTableManager
|
|||||||
checksum: checksum,
|
checksum: checksum,
|
||||||
isFavorite: isFavorite,
|
isFavorite: isFavorite,
|
||||||
orientation: orientation,
|
orientation: orientation,
|
||||||
cloudId: cloudId,
|
iCloudId: iCloudId,
|
||||||
),
|
),
|
||||||
createCompanionCallback:
|
createCompanionCallback:
|
||||||
({
|
({
|
||||||
@ -311,7 +311,7 @@ class $$LocalAssetEntityTableTableManager
|
|||||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||||
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
i0.Value<bool> isFavorite = const i0.Value.absent(),
|
||||||
i0.Value<int> orientation = const i0.Value.absent(),
|
i0.Value<int> orientation = const i0.Value.absent(),
|
||||||
i0.Value<String?> cloudId = const i0.Value.absent(),
|
i0.Value<String?> iCloudId = const i0.Value.absent(),
|
||||||
}) => i1.LocalAssetEntityCompanion.insert(
|
}) => i1.LocalAssetEntityCompanion.insert(
|
||||||
name: name,
|
name: name,
|
||||||
type: type,
|
type: type,
|
||||||
@ -324,7 +324,7 @@ class $$LocalAssetEntityTableTableManager
|
|||||||
checksum: checksum,
|
checksum: checksum,
|
||||||
isFavorite: isFavorite,
|
isFavorite: isFavorite,
|
||||||
orientation: orientation,
|
orientation: orientation,
|
||||||
cloudId: cloudId,
|
iCloudId: iCloudId,
|
||||||
),
|
),
|
||||||
withReferenceMapper: (p0) => p0
|
withReferenceMapper: (p0) => p0
|
||||||
.map((e) => (e.readTable(table), i0.BaseReferences(db, table, e)))
|
.map((e) => (e.readTable(table), i0.BaseReferences(db, table, e)))
|
||||||
@ -492,12 +492,12 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultValue: const i4.Constant(0),
|
defaultValue: const i4.Constant(0),
|
||||||
);
|
);
|
||||||
static const i0.VerificationMeta _cloudIdMeta = const i0.VerificationMeta(
|
static const i0.VerificationMeta _iCloudIdMeta = const i0.VerificationMeta(
|
||||||
'cloudId',
|
'iCloudId',
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
late final i0.GeneratedColumn<String> cloudId = i0.GeneratedColumn<String>(
|
late final i0.GeneratedColumn<String> iCloudId = i0.GeneratedColumn<String>(
|
||||||
'cloud_id',
|
'i_cloud_id',
|
||||||
aliasedName,
|
aliasedName,
|
||||||
true,
|
true,
|
||||||
type: i0.DriftSqlType.string,
|
type: i0.DriftSqlType.string,
|
||||||
@ -516,7 +516,7 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||||||
checksum,
|
checksum,
|
||||||
isFavorite,
|
isFavorite,
|
||||||
orientation,
|
orientation,
|
||||||
cloudId,
|
iCloudId,
|
||||||
];
|
];
|
||||||
@override
|
@override
|
||||||
String get aliasedName => _alias ?? actualTableName;
|
String get aliasedName => _alias ?? actualTableName;
|
||||||
@ -597,10 +597,10 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (data.containsKey('cloud_id')) {
|
if (data.containsKey('i_cloud_id')) {
|
||||||
context.handle(
|
context.handle(
|
||||||
_cloudIdMeta,
|
_iCloudIdMeta,
|
||||||
cloudId.isAcceptableOrUnknown(data['cloud_id']!, _cloudIdMeta),
|
iCloudId.isAcceptableOrUnknown(data['i_cloud_id']!, _iCloudIdMeta),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return context;
|
return context;
|
||||||
@ -661,9 +661,9 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
|
|||||||
i0.DriftSqlType.int,
|
i0.DriftSqlType.int,
|
||||||
data['${effectivePrefix}orientation'],
|
data['${effectivePrefix}orientation'],
|
||||||
)!,
|
)!,
|
||||||
cloudId: attachedDatabase.typeMapping.read(
|
iCloudId: attachedDatabase.typeMapping.read(
|
||||||
i0.DriftSqlType.string,
|
i0.DriftSqlType.string,
|
||||||
data['${effectivePrefix}cloud_id'],
|
data['${effectivePrefix}i_cloud_id'],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -694,7 +694,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
final String? checksum;
|
final String? checksum;
|
||||||
final bool isFavorite;
|
final bool isFavorite;
|
||||||
final int orientation;
|
final int orientation;
|
||||||
final String? cloudId;
|
final String? iCloudId;
|
||||||
const LocalAssetEntityData({
|
const LocalAssetEntityData({
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.type,
|
required this.type,
|
||||||
@ -707,7 +707,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
this.checksum,
|
this.checksum,
|
||||||
required this.isFavorite,
|
required this.isFavorite,
|
||||||
required this.orientation,
|
required this.orientation,
|
||||||
this.cloudId,
|
this.iCloudId,
|
||||||
});
|
});
|
||||||
@override
|
@override
|
||||||
Map<String, i0.Expression> toColumns(bool nullToAbsent) {
|
Map<String, i0.Expression> toColumns(bool nullToAbsent) {
|
||||||
@ -735,8 +735,8 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
}
|
}
|
||||||
map['is_favorite'] = i0.Variable<bool>(isFavorite);
|
map['is_favorite'] = i0.Variable<bool>(isFavorite);
|
||||||
map['orientation'] = i0.Variable<int>(orientation);
|
map['orientation'] = i0.Variable<int>(orientation);
|
||||||
if (!nullToAbsent || cloudId != null) {
|
if (!nullToAbsent || iCloudId != null) {
|
||||||
map['cloud_id'] = i0.Variable<String>(cloudId);
|
map['i_cloud_id'] = i0.Variable<String>(iCloudId);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@ -760,7 +760,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
checksum: serializer.fromJson<String?>(json['checksum']),
|
checksum: serializer.fromJson<String?>(json['checksum']),
|
||||||
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
|
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
|
||||||
orientation: serializer.fromJson<int>(json['orientation']),
|
orientation: serializer.fromJson<int>(json['orientation']),
|
||||||
cloudId: serializer.fromJson<String?>(json['cloudId']),
|
iCloudId: serializer.fromJson<String?>(json['iCloudId']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
@ -780,7 +780,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
'checksum': serializer.toJson<String?>(checksum),
|
'checksum': serializer.toJson<String?>(checksum),
|
||||||
'isFavorite': serializer.toJson<bool>(isFavorite),
|
'isFavorite': serializer.toJson<bool>(isFavorite),
|
||||||
'orientation': serializer.toJson<int>(orientation),
|
'orientation': serializer.toJson<int>(orientation),
|
||||||
'cloudId': serializer.toJson<String?>(cloudId),
|
'iCloudId': serializer.toJson<String?>(iCloudId),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,7 +796,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
i0.Value<String?> checksum = const i0.Value.absent(),
|
i0.Value<String?> checksum = const i0.Value.absent(),
|
||||||
bool? isFavorite,
|
bool? isFavorite,
|
||||||
int? orientation,
|
int? orientation,
|
||||||
i0.Value<String?> cloudId = const i0.Value.absent(),
|
i0.Value<String?> iCloudId = const i0.Value.absent(),
|
||||||
}) => i1.LocalAssetEntityData(
|
}) => i1.LocalAssetEntityData(
|
||||||
name: name ?? this.name,
|
name: name ?? this.name,
|
||||||
type: type ?? this.type,
|
type: type ?? this.type,
|
||||||
@ -811,7 +811,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
checksum: checksum.present ? checksum.value : this.checksum,
|
checksum: checksum.present ? checksum.value : this.checksum,
|
||||||
isFavorite: isFavorite ?? this.isFavorite,
|
isFavorite: isFavorite ?? this.isFavorite,
|
||||||
orientation: orientation ?? this.orientation,
|
orientation: orientation ?? this.orientation,
|
||||||
cloudId: cloudId.present ? cloudId.value : this.cloudId,
|
iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId,
|
||||||
);
|
);
|
||||||
LocalAssetEntityData copyWithCompanion(i1.LocalAssetEntityCompanion data) {
|
LocalAssetEntityData copyWithCompanion(i1.LocalAssetEntityCompanion data) {
|
||||||
return LocalAssetEntityData(
|
return LocalAssetEntityData(
|
||||||
@ -832,7 +832,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
orientation: data.orientation.present
|
orientation: data.orientation.present
|
||||||
? data.orientation.value
|
? data.orientation.value
|
||||||
: this.orientation,
|
: this.orientation,
|
||||||
cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId,
|
iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -850,7 +850,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
..write('checksum: $checksum, ')
|
..write('checksum: $checksum, ')
|
||||||
..write('isFavorite: $isFavorite, ')
|
..write('isFavorite: $isFavorite, ')
|
||||||
..write('orientation: $orientation, ')
|
..write('orientation: $orientation, ')
|
||||||
..write('cloudId: $cloudId')
|
..write('iCloudId: $iCloudId')
|
||||||
..write(')'))
|
..write(')'))
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
@ -868,7 +868,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
checksum,
|
checksum,
|
||||||
isFavorite,
|
isFavorite,
|
||||||
orientation,
|
orientation,
|
||||||
cloudId,
|
iCloudId,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
@ -885,7 +885,7 @@ class LocalAssetEntityData extends i0.DataClass
|
|||||||
other.checksum == this.checksum &&
|
other.checksum == this.checksum &&
|
||||||
other.isFavorite == this.isFavorite &&
|
other.isFavorite == this.isFavorite &&
|
||||||
other.orientation == this.orientation &&
|
other.orientation == this.orientation &&
|
||||||
other.cloudId == this.cloudId);
|
other.iCloudId == this.iCloudId);
|
||||||
}
|
}
|
||||||
|
|
||||||
class LocalAssetEntityCompanion
|
class LocalAssetEntityCompanion
|
||||||
@ -901,7 +901,7 @@ class LocalAssetEntityCompanion
|
|||||||
final i0.Value<String?> checksum;
|
final i0.Value<String?> checksum;
|
||||||
final i0.Value<bool> isFavorite;
|
final i0.Value<bool> isFavorite;
|
||||||
final i0.Value<int> orientation;
|
final i0.Value<int> orientation;
|
||||||
final i0.Value<String?> cloudId;
|
final i0.Value<String?> iCloudId;
|
||||||
const LocalAssetEntityCompanion({
|
const LocalAssetEntityCompanion({
|
||||||
this.name = const i0.Value.absent(),
|
this.name = const i0.Value.absent(),
|
||||||
this.type = const i0.Value.absent(),
|
this.type = const i0.Value.absent(),
|
||||||
@ -914,7 +914,7 @@ class LocalAssetEntityCompanion
|
|||||||
this.checksum = const i0.Value.absent(),
|
this.checksum = const i0.Value.absent(),
|
||||||
this.isFavorite = const i0.Value.absent(),
|
this.isFavorite = const i0.Value.absent(),
|
||||||
this.orientation = const i0.Value.absent(),
|
this.orientation = const i0.Value.absent(),
|
||||||
this.cloudId = const i0.Value.absent(),
|
this.iCloudId = const i0.Value.absent(),
|
||||||
});
|
});
|
||||||
LocalAssetEntityCompanion.insert({
|
LocalAssetEntityCompanion.insert({
|
||||||
required String name,
|
required String name,
|
||||||
@ -928,7 +928,7 @@ class LocalAssetEntityCompanion
|
|||||||
this.checksum = const i0.Value.absent(),
|
this.checksum = const i0.Value.absent(),
|
||||||
this.isFavorite = const i0.Value.absent(),
|
this.isFavorite = const i0.Value.absent(),
|
||||||
this.orientation = const i0.Value.absent(),
|
this.orientation = const i0.Value.absent(),
|
||||||
this.cloudId = const i0.Value.absent(),
|
this.iCloudId = const i0.Value.absent(),
|
||||||
}) : name = i0.Value(name),
|
}) : name = i0.Value(name),
|
||||||
type = i0.Value(type),
|
type = i0.Value(type),
|
||||||
id = i0.Value(id);
|
id = i0.Value(id);
|
||||||
@ -944,7 +944,7 @@ class LocalAssetEntityCompanion
|
|||||||
i0.Expression<String>? checksum,
|
i0.Expression<String>? checksum,
|
||||||
i0.Expression<bool>? isFavorite,
|
i0.Expression<bool>? isFavorite,
|
||||||
i0.Expression<int>? orientation,
|
i0.Expression<int>? orientation,
|
||||||
i0.Expression<String>? cloudId,
|
i0.Expression<String>? iCloudId,
|
||||||
}) {
|
}) {
|
||||||
return i0.RawValuesInsertable({
|
return i0.RawValuesInsertable({
|
||||||
if (name != null) 'name': name,
|
if (name != null) 'name': name,
|
||||||
@ -958,7 +958,7 @@ class LocalAssetEntityCompanion
|
|||||||
if (checksum != null) 'checksum': checksum,
|
if (checksum != null) 'checksum': checksum,
|
||||||
if (isFavorite != null) 'is_favorite': isFavorite,
|
if (isFavorite != null) 'is_favorite': isFavorite,
|
||||||
if (orientation != null) 'orientation': orientation,
|
if (orientation != null) 'orientation': orientation,
|
||||||
if (cloudId != null) 'cloud_id': cloudId,
|
if (iCloudId != null) 'i_cloud_id': iCloudId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -974,7 +974,7 @@ class LocalAssetEntityCompanion
|
|||||||
i0.Value<String?>? checksum,
|
i0.Value<String?>? checksum,
|
||||||
i0.Value<bool>? isFavorite,
|
i0.Value<bool>? isFavorite,
|
||||||
i0.Value<int>? orientation,
|
i0.Value<int>? orientation,
|
||||||
i0.Value<String?>? cloudId,
|
i0.Value<String?>? iCloudId,
|
||||||
}) {
|
}) {
|
||||||
return i1.LocalAssetEntityCompanion(
|
return i1.LocalAssetEntityCompanion(
|
||||||
name: name ?? this.name,
|
name: name ?? this.name,
|
||||||
@ -988,7 +988,7 @@ class LocalAssetEntityCompanion
|
|||||||
checksum: checksum ?? this.checksum,
|
checksum: checksum ?? this.checksum,
|
||||||
isFavorite: isFavorite ?? this.isFavorite,
|
isFavorite: isFavorite ?? this.isFavorite,
|
||||||
orientation: orientation ?? this.orientation,
|
orientation: orientation ?? this.orientation,
|
||||||
cloudId: cloudId ?? this.cloudId,
|
iCloudId: iCloudId ?? this.iCloudId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1030,8 +1030,8 @@ class LocalAssetEntityCompanion
|
|||||||
if (orientation.present) {
|
if (orientation.present) {
|
||||||
map['orientation'] = i0.Variable<int>(orientation.value);
|
map['orientation'] = i0.Variable<int>(orientation.value);
|
||||||
}
|
}
|
||||||
if (cloudId.present) {
|
if (iCloudId.present) {
|
||||||
map['cloud_id'] = i0.Variable<String>(cloudId.value);
|
map['i_cloud_id'] = i0.Variable<String>(iCloudId.value);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@ -1050,7 +1050,7 @@ class LocalAssetEntityCompanion
|
|||||||
..write('checksum: $checksum, ')
|
..write('checksum: $checksum, ')
|
||||||
..write('isFavorite: $isFavorite, ')
|
..write('isFavorite: $isFavorite, ')
|
||||||
..write('orientation: $orientation, ')
|
..write('orientation: $orientation, ')
|
||||||
..write('cloudId: $cloudId')
|
..write('iCloudId: $iCloudId')
|
||||||
..write(')'))
|
..write(')'))
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ SELECT
|
|||||||
rae.live_photo_video_id,
|
rae.live_photo_video_id,
|
||||||
0 as orientation,
|
0 as orientation,
|
||||||
rae.stack_id,
|
rae.stack_id,
|
||||||
NULL as cloud_id
|
NULL as i_cloud_id
|
||||||
FROM
|
FROM
|
||||||
remote_asset_entity rae
|
remote_asset_entity rae
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
@ -55,7 +55,7 @@ SELECT
|
|||||||
NULL as live_photo_video_id,
|
NULL as live_photo_video_id,
|
||||||
lae.orientation,
|
lae.orientation,
|
||||||
NULL as stack_id,
|
NULL as stack_id,
|
||||||
lae.cloud_id
|
lae.i_cloud_id
|
||||||
FROM
|
FROM
|
||||||
local_asset_entity lae
|
local_asset_entity lae
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||||||
);
|
);
|
||||||
$arrayStartIndex += generatedlimit.amountOfVariables;
|
$arrayStartIndex += generatedlimit.amountOfVariables;
|
||||||
return customSelect(
|
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 cloud_id 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.cloud_id 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_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 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 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: [
|
variables: [
|
||||||
for (var $ in userIds) i0.Variable<String>($),
|
for (var $ in userIds) i0.Variable<String>($),
|
||||||
...generatedlimit.introducedVariables,
|
...generatedlimit.introducedVariables,
|
||||||
@ -62,7 +62,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||||||
livePhotoVideoId: row.readNullable<String>('live_photo_video_id'),
|
livePhotoVideoId: row.readNullable<String>('live_photo_video_id'),
|
||||||
orientation: row.read<int>('orientation'),
|
orientation: row.read<int>('orientation'),
|
||||||
stackId: row.readNullable<String>('stack_id'),
|
stackId: row.readNullable<String>('stack_id'),
|
||||||
cloudId: row.readNullable<String>('cloud_id'),
|
iCloudId: row.readNullable<String>('i_cloud_id'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ class MergedAssetResult {
|
|||||||
final String? livePhotoVideoId;
|
final String? livePhotoVideoId;
|
||||||
final int orientation;
|
final int orientation;
|
||||||
final String? stackId;
|
final String? stackId;
|
||||||
final String? cloudId;
|
final String? iCloudId;
|
||||||
MergedAssetResult({
|
MergedAssetResult({
|
||||||
this.remoteId,
|
this.remoteId,
|
||||||
this.localId,
|
this.localId,
|
||||||
@ -148,7 +148,7 @@ class MergedAssetResult {
|
|||||||
this.livePhotoVideoId,
|
this.livePhotoVideoId,
|
||||||
required this.orientation,
|
required this.orientation,
|
||||||
this.stackId,
|
this.stackId,
|
||||||
this.cloudId,
|
this.iCloudId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -137,7 +137,7 @@ class Drift extends $Drift implements IDatabaseRepository {
|
|||||||
},
|
},
|
||||||
from10To11: (m, v11) async {
|
from10To11: (m, v11) async {
|
||||||
// Add cloud_id to local and remote asset tables
|
// Add cloud_id to local and remote asset tables
|
||||||
await m.addColumn(v11.localAssetEntity, v11.localAssetEntity.cloudId);
|
await m.addColumn(v11.localAssetEntity, v11.localAssetEntity.iCloudId);
|
||||||
await m.createIndex(v11.idxLocalAssetCloudId);
|
await m.createIndex(v11.idxLocalAssetCloudId);
|
||||||
await m.createTable(v11.remoteAssetCloudIdEntity);
|
await m.createTable(v11.remoteAssetCloudIdEntity);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4691,13 +4691,13 @@ class Shape22 extends i0.VersionedTable {
|
|||||||
columnsByName['is_favorite']! as i1.GeneratedColumn<bool>;
|
columnsByName['is_favorite']! as i1.GeneratedColumn<bool>;
|
||||||
i1.GeneratedColumn<int> get orientation =>
|
i1.GeneratedColumn<int> get orientation =>
|
||||||
columnsByName['orientation']! as i1.GeneratedColumn<int>;
|
columnsByName['orientation']! as i1.GeneratedColumn<int>;
|
||||||
i1.GeneratedColumn<String> get cloudId =>
|
i1.GeneratedColumn<String> get iCloudId =>
|
||||||
columnsByName['cloud_id']! as i1.GeneratedColumn<String>;
|
columnsByName['i_cloud_id']! as i1.GeneratedColumn<String>;
|
||||||
}
|
}
|
||||||
|
|
||||||
i1.GeneratedColumn<String> _column_95(String aliasedName) =>
|
i1.GeneratedColumn<String> _column_95(String aliasedName) =>
|
||||||
i1.GeneratedColumn<String>(
|
i1.GeneratedColumn<String>(
|
||||||
'cloud_id',
|
'i_cloud_id',
|
||||||
aliasedName,
|
aliasedName,
|
||||||
true,
|
true,
|
||||||
type: i1.DriftSqlType.string,
|
type: i1.DriftSqlType.string,
|
||||||
|
|||||||
@ -243,7 +243,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository {
|
|||||||
|
|
||||||
batch.update(
|
batch.update(
|
||||||
_db.localAssetEntity,
|
_db.localAssetEntity,
|
||||||
LocalAssetEntityCompanion(cloudId: Value(cloudId)),
|
LocalAssetEntityCompanion(iCloudId: Value(cloudId)),
|
||||||
where: (f) => f.id.equals(assetId),
|
where: (f) => f.id.equals(assetId),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class DriftLocalAssetRepository extends DriftDatabaseRepository {
|
|||||||
_db.localAssetEntity.selectOnly().join([
|
_db.localAssetEntity.selectOnly().join([
|
||||||
leftOuterJoin(
|
leftOuterJoin(
|
||||||
_db.remoteAssetCloudIdEntity,
|
_db.remoteAssetCloudIdEntity,
|
||||||
_db.localAssetEntity.cloudId.equalsExp(_db.remoteAssetCloudIdEntity.cloudId),
|
_db.localAssetEntity.iCloudId.equalsExp(_db.remoteAssetCloudIdEntity.cloudId),
|
||||||
useColumns: false,
|
useColumns: false,
|
||||||
),
|
),
|
||||||
leftOuterJoin(
|
leftOuterJoin(
|
||||||
|
|||||||
@ -87,7 +87,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
|
|||||||
isFavorite: row.isFavorite,
|
isFavorite: row.isFavorite,
|
||||||
durationInSeconds: row.durationInSeconds,
|
durationInSeconds: row.durationInSeconds,
|
||||||
orientation: row.orientation,
|
orientation: row.orientation,
|
||||||
cloudId: row.cloudId,
|
cloudId: row.iCloudId,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.get();
|
.get();
|
||||||
|
|||||||
54
mobile/test/drift/main/generated/schema_v11.dart
generated
54
mobile/test/drift/main/generated/schema_v11.dart
generated
@ -1486,8 +1486,8 @@ class LocalAssetEntity extends Table
|
|||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultValue: const CustomExpression('0'),
|
defaultValue: const CustomExpression('0'),
|
||||||
);
|
);
|
||||||
late final GeneratedColumn<String> cloudId = GeneratedColumn<String>(
|
late final GeneratedColumn<String> iCloudId = GeneratedColumn<String>(
|
||||||
'cloud_id',
|
'i_cloud_id',
|
||||||
aliasedName,
|
aliasedName,
|
||||||
true,
|
true,
|
||||||
type: DriftSqlType.string,
|
type: DriftSqlType.string,
|
||||||
@ -1506,7 +1506,7 @@ class LocalAssetEntity extends Table
|
|||||||
checksum,
|
checksum,
|
||||||
isFavorite,
|
isFavorite,
|
||||||
orientation,
|
orientation,
|
||||||
cloudId,
|
iCloudId,
|
||||||
];
|
];
|
||||||
@override
|
@override
|
||||||
String get aliasedName => _alias ?? actualTableName;
|
String get aliasedName => _alias ?? actualTableName;
|
||||||
@ -1563,9 +1563,9 @@ class LocalAssetEntity extends Table
|
|||||||
DriftSqlType.int,
|
DriftSqlType.int,
|
||||||
data['${effectivePrefix}orientation'],
|
data['${effectivePrefix}orientation'],
|
||||||
)!,
|
)!,
|
||||||
cloudId: attachedDatabase.typeMapping.read(
|
iCloudId: attachedDatabase.typeMapping.read(
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}cloud_id'],
|
data['${effectivePrefix}i_cloud_id'],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1594,7 +1594,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
final String? checksum;
|
final String? checksum;
|
||||||
final bool isFavorite;
|
final bool isFavorite;
|
||||||
final int orientation;
|
final int orientation;
|
||||||
final String? cloudId;
|
final String? iCloudId;
|
||||||
const LocalAssetEntityData({
|
const LocalAssetEntityData({
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.type,
|
required this.type,
|
||||||
@ -1607,7 +1607,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
this.checksum,
|
this.checksum,
|
||||||
required this.isFavorite,
|
required this.isFavorite,
|
||||||
required this.orientation,
|
required this.orientation,
|
||||||
this.cloudId,
|
this.iCloudId,
|
||||||
});
|
});
|
||||||
@override
|
@override
|
||||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||||
@ -1631,8 +1631,8 @@ class LocalAssetEntityData extends DataClass
|
|||||||
}
|
}
|
||||||
map['is_favorite'] = Variable<bool>(isFavorite);
|
map['is_favorite'] = Variable<bool>(isFavorite);
|
||||||
map['orientation'] = Variable<int>(orientation);
|
map['orientation'] = Variable<int>(orientation);
|
||||||
if (!nullToAbsent || cloudId != null) {
|
if (!nullToAbsent || iCloudId != null) {
|
||||||
map['cloud_id'] = Variable<String>(cloudId);
|
map['i_cloud_id'] = Variable<String>(iCloudId);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@ -1654,7 +1654,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
checksum: serializer.fromJson<String?>(json['checksum']),
|
checksum: serializer.fromJson<String?>(json['checksum']),
|
||||||
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
|
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
|
||||||
orientation: serializer.fromJson<int>(json['orientation']),
|
orientation: serializer.fromJson<int>(json['orientation']),
|
||||||
cloudId: serializer.fromJson<String?>(json['cloudId']),
|
iCloudId: serializer.fromJson<String?>(json['iCloudId']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
@ -1672,7 +1672,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
'checksum': serializer.toJson<String?>(checksum),
|
'checksum': serializer.toJson<String?>(checksum),
|
||||||
'isFavorite': serializer.toJson<bool>(isFavorite),
|
'isFavorite': serializer.toJson<bool>(isFavorite),
|
||||||
'orientation': serializer.toJson<int>(orientation),
|
'orientation': serializer.toJson<int>(orientation),
|
||||||
'cloudId': serializer.toJson<String?>(cloudId),
|
'iCloudId': serializer.toJson<String?>(iCloudId),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1688,7 +1688,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
Value<String?> checksum = const Value.absent(),
|
Value<String?> checksum = const Value.absent(),
|
||||||
bool? isFavorite,
|
bool? isFavorite,
|
||||||
int? orientation,
|
int? orientation,
|
||||||
Value<String?> cloudId = const Value.absent(),
|
Value<String?> iCloudId = const Value.absent(),
|
||||||
}) => LocalAssetEntityData(
|
}) => LocalAssetEntityData(
|
||||||
name: name ?? this.name,
|
name: name ?? this.name,
|
||||||
type: type ?? this.type,
|
type: type ?? this.type,
|
||||||
@ -1703,7 +1703,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
checksum: checksum.present ? checksum.value : this.checksum,
|
checksum: checksum.present ? checksum.value : this.checksum,
|
||||||
isFavorite: isFavorite ?? this.isFavorite,
|
isFavorite: isFavorite ?? this.isFavorite,
|
||||||
orientation: orientation ?? this.orientation,
|
orientation: orientation ?? this.orientation,
|
||||||
cloudId: cloudId.present ? cloudId.value : this.cloudId,
|
iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId,
|
||||||
);
|
);
|
||||||
LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) {
|
LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) {
|
||||||
return LocalAssetEntityData(
|
return LocalAssetEntityData(
|
||||||
@ -1724,7 +1724,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
orientation: data.orientation.present
|
orientation: data.orientation.present
|
||||||
? data.orientation.value
|
? data.orientation.value
|
||||||
: this.orientation,
|
: this.orientation,
|
||||||
cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId,
|
iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1742,7 +1742,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
..write('checksum: $checksum, ')
|
..write('checksum: $checksum, ')
|
||||||
..write('isFavorite: $isFavorite, ')
|
..write('isFavorite: $isFavorite, ')
|
||||||
..write('orientation: $orientation, ')
|
..write('orientation: $orientation, ')
|
||||||
..write('cloudId: $cloudId')
|
..write('iCloudId: $iCloudId')
|
||||||
..write(')'))
|
..write(')'))
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
@ -1760,7 +1760,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
checksum,
|
checksum,
|
||||||
isFavorite,
|
isFavorite,
|
||||||
orientation,
|
orientation,
|
||||||
cloudId,
|
iCloudId,
|
||||||
);
|
);
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
@ -1777,7 +1777,7 @@ class LocalAssetEntityData extends DataClass
|
|||||||
other.checksum == this.checksum &&
|
other.checksum == this.checksum &&
|
||||||
other.isFavorite == this.isFavorite &&
|
other.isFavorite == this.isFavorite &&
|
||||||
other.orientation == this.orientation &&
|
other.orientation == this.orientation &&
|
||||||
other.cloudId == this.cloudId);
|
other.iCloudId == this.iCloudId);
|
||||||
}
|
}
|
||||||
|
|
||||||
class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
||||||
@ -1792,7 +1792,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
final Value<String?> checksum;
|
final Value<String?> checksum;
|
||||||
final Value<bool> isFavorite;
|
final Value<bool> isFavorite;
|
||||||
final Value<int> orientation;
|
final Value<int> orientation;
|
||||||
final Value<String?> cloudId;
|
final Value<String?> iCloudId;
|
||||||
const LocalAssetEntityCompanion({
|
const LocalAssetEntityCompanion({
|
||||||
this.name = const Value.absent(),
|
this.name = const Value.absent(),
|
||||||
this.type = const Value.absent(),
|
this.type = const Value.absent(),
|
||||||
@ -1805,7 +1805,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
this.checksum = const Value.absent(),
|
this.checksum = const Value.absent(),
|
||||||
this.isFavorite = const Value.absent(),
|
this.isFavorite = const Value.absent(),
|
||||||
this.orientation = const Value.absent(),
|
this.orientation = const Value.absent(),
|
||||||
this.cloudId = const Value.absent(),
|
this.iCloudId = const Value.absent(),
|
||||||
});
|
});
|
||||||
LocalAssetEntityCompanion.insert({
|
LocalAssetEntityCompanion.insert({
|
||||||
required String name,
|
required String name,
|
||||||
@ -1819,7 +1819,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
this.checksum = const Value.absent(),
|
this.checksum = const Value.absent(),
|
||||||
this.isFavorite = const Value.absent(),
|
this.isFavorite = const Value.absent(),
|
||||||
this.orientation = const Value.absent(),
|
this.orientation = const Value.absent(),
|
||||||
this.cloudId = const Value.absent(),
|
this.iCloudId = const Value.absent(),
|
||||||
}) : name = Value(name),
|
}) : name = Value(name),
|
||||||
type = Value(type),
|
type = Value(type),
|
||||||
id = Value(id);
|
id = Value(id);
|
||||||
@ -1835,7 +1835,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
Expression<String>? checksum,
|
Expression<String>? checksum,
|
||||||
Expression<bool>? isFavorite,
|
Expression<bool>? isFavorite,
|
||||||
Expression<int>? orientation,
|
Expression<int>? orientation,
|
||||||
Expression<String>? cloudId,
|
Expression<String>? iCloudId,
|
||||||
}) {
|
}) {
|
||||||
return RawValuesInsertable({
|
return RawValuesInsertable({
|
||||||
if (name != null) 'name': name,
|
if (name != null) 'name': name,
|
||||||
@ -1849,7 +1849,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
if (checksum != null) 'checksum': checksum,
|
if (checksum != null) 'checksum': checksum,
|
||||||
if (isFavorite != null) 'is_favorite': isFavorite,
|
if (isFavorite != null) 'is_favorite': isFavorite,
|
||||||
if (orientation != null) 'orientation': orientation,
|
if (orientation != null) 'orientation': orientation,
|
||||||
if (cloudId != null) 'cloud_id': cloudId,
|
if (iCloudId != null) 'i_cloud_id': iCloudId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1865,7 +1865,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
Value<String?>? checksum,
|
Value<String?>? checksum,
|
||||||
Value<bool>? isFavorite,
|
Value<bool>? isFavorite,
|
||||||
Value<int>? orientation,
|
Value<int>? orientation,
|
||||||
Value<String?>? cloudId,
|
Value<String?>? iCloudId,
|
||||||
}) {
|
}) {
|
||||||
return LocalAssetEntityCompanion(
|
return LocalAssetEntityCompanion(
|
||||||
name: name ?? this.name,
|
name: name ?? this.name,
|
||||||
@ -1879,7 +1879,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
checksum: checksum ?? this.checksum,
|
checksum: checksum ?? this.checksum,
|
||||||
isFavorite: isFavorite ?? this.isFavorite,
|
isFavorite: isFavorite ?? this.isFavorite,
|
||||||
orientation: orientation ?? this.orientation,
|
orientation: orientation ?? this.orientation,
|
||||||
cloudId: cloudId ?? this.cloudId,
|
iCloudId: iCloudId ?? this.iCloudId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1919,8 +1919,8 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
if (orientation.present) {
|
if (orientation.present) {
|
||||||
map['orientation'] = Variable<int>(orientation.value);
|
map['orientation'] = Variable<int>(orientation.value);
|
||||||
}
|
}
|
||||||
if (cloudId.present) {
|
if (iCloudId.present) {
|
||||||
map['cloud_id'] = Variable<String>(cloudId.value);
|
map['i_cloud_id'] = Variable<String>(iCloudId.value);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@ -1939,7 +1939,7 @@ class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
|
|||||||
..write('checksum: $checksum, ')
|
..write('checksum: $checksum, ')
|
||||||
..write('isFavorite: $isFavorite, ')
|
..write('isFavorite: $isFavorite, ')
|
||||||
..write('orientation: $orientation, ')
|
..write('orientation: $orientation, ')
|
||||||
..write('cloudId: $cloudId')
|
..write('iCloudId: $iCloudId')
|
||||||
..write(')'))
|
..write(')'))
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user