Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Jun 18, 2024
1 parent a4144a3 commit 9ae8b73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sembast_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ Future main() async {
* Transactions must be idempotent (i.e. they must produce the same result if run twice) as they might run again in case of concurrent access.
* WASM support as of 2.3.0 (legacy html version available through `sembast_web_html.dart` import)

### Use the same web port when debugging

The database is stored in the browser indexeddb. Like any other web storage, it is tied to the port. (i.e. localhost:8080 is different from localhost:8081).
When debugging, you should use the same port to keep the same indexeddb database.

## How it works

Like sembast the whole database is loaded into memory from indexedDB. It notifies cross tabs
using localStorage. data is incrementally updated from indexedDB. If a transaction is ran after
some changes happens, new data is loaded and transaction is ran again.

The only exported API is `databaseFactoryWeb`. For more information on the API see [sembast](https://pub.dev/packages/sembast) documentation.

0 comments on commit 9ae8b73

Please sign in to comment.