refactor repositories

This commit is contained in:
shenlong-tanwen
2024-09-21 20:04:05 +05:30
parent d6495f014d
commit e810512285
23 changed files with 142 additions and 127 deletions
@@ -30,7 +30,7 @@ class StoreDriftRepository with LogMixin implements IStoreRepository {
}
@override
FutureOr<bool> set<T, U>(StoreKey<T, U> key, T value) async {
FutureOr<bool> upsert<T, U>(StoreKey<T, U> key, T value) async {
try {
final storeValue = key.converter.toPrimitive(value);
final intValue = (key.type == int) ? storeValue as int : null;
@@ -61,7 +61,7 @@ class StoreDriftRepository with LogMixin implements IStoreRepository {
}
@override
FutureOr<void> clearStore() async {
FutureOr<void> deleteAll() async {
await _db.managers.store.delete();
}