Use IndexedDBBackend.open to obtain a storage backend connected to
the specified IndexedDB database.
Example
// Connect to the IndexedDB database. conststorage = awaitIndexedDBBackend.open("my-docs", 1); // Declare a document type. typeDocument = { id: string; value: number }; // Create the table. constdocs = Table.create<Document>() .withPrimaryKey(index<Document>().key("id")) // Connect the table to our storage. .withStorage(storage); // Wait until the table has finished syncing with the storage. awaitdocs.ready; // Ready for use! docs.add({ id:"Robert", value:9001 });
Storage backend using an IndexedDB database.
Use IndexedDBBackend.open to obtain a storage backend connected to the specified IndexedDB database.
Example