effect-io-ai

Package: @effect/platform-browser
Module: IndexedDbDatabase

IndexedDbDatabase.IndexedDbDatabase

Service tag for an open IndexedDB database, its IDBKeyRange constructor, reactivity service, and rebuild effect.

When to use

Use when you need access to the live database service after an IndexedDbSchema layer has been provided, especially for rebuild or lower-level database primitives.

Details

database is a mutable reference to the current IDBDatabase. IDBKeyRange and reactivity are shared with query builders created from the schema.

Gotchas

rebuild closes and deletes the browser database, then reopens it and reruns migrations. Records not recreated by migrations are removed.

See

Signature

declare class IndexedDbDatabase

Source

Since v4.0.0