-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ADR for DOMException error when use delete disk of Hive for Web
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
docs/adr/0006-dom-exception-error-when-delete-disk-for-web.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 0006. DOMException error when use delete disk of Hive for Web | ||
|
||
Date: 2023-09-13 | ||
|
||
## Status | ||
|
||
- Issue: | ||
[#1533](https://github.com/famedly/matrix-dart-sdk/issues/1533) | ||
[#850](https://github.com/isar/hive/issues/850) | ||
|
||
## Context | ||
|
||
``` | ||
Currently, we have two BoxCollection: HiveCollectionToMDatabase and FlutterHiveCollectionsDatabase (Matrix) | ||
In Web platform when we use Hive database, we use the deleteFromDisk() method to delete the database | ||
and recreate it. But when we use this method, we have a DOMException error. | ||
``` | ||
|
||
## Decision | ||
- Workout round | ||
1. Check platform is Web we don't use deleteFromDisk() method. Only support for Mobile platform. | ||
2. After we have used deleteFromDisk() method. When logging back in, you need to reopen the BoxCollection | ||
|
||
## Consequences | ||
|
||
1. The funcs are then blocked if deleteDisk both BoxCollection | ||
2. When logging back in, can't open and put data to HiveCollectionToMDatabase | ||
then can't call API use configuration of HiveCollectionToMDatabase |