timeline go brrrrr

This commit is contained in:
shenlong-tanwen
2025-03-19 00:03:45 +05:30
parent b82b9a550a
commit 6311ecadd4
12 changed files with 323 additions and 249 deletions
@@ -16,16 +16,16 @@ class AssetRepository with LogMixin implements IAssetRepository {
@override
Future<bool> upsertAll(Iterable<Asset> assets) async {
try {
await _db.txn(() async => await _db.batch((batch) {
final rows = assets.map(_toEntity);
for (final row in rows) {
batch.insert(
_db.asset,
row,
onConflict: DoUpdate((_) => row, target: [_db.asset.hash]),
);
}
}));
await _db.batch((batch) {
final rows = assets.map(_toEntity);
for (final row in rows) {
batch.insert(
_db.asset,
row,
onConflict: DoUpdate((_) => row, target: [_db.asset.hash]),
);
}
});
return true;
} catch (e, s) {