Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/entries/browser.ts>DocDriverIndexedDB

Storage for private, distributed, offline-first applications.
Go to Latest
class DocDriverIndexedDB
implements IReplicaDocDriver
import { DocDriverIndexedDB } from "https://deno.land/x/earthstar@v10.2.0/src/entries/browser.ts";

Constructors

new
DocDriverIndexedDB(share: ShareAddress, namespace?: string)

Properties

private
closed: boolean
private
db
private
gotInitialMaxLocalIndex
private
localMaxLocalIndex
share: ShareAddress

Methods

close(erase: boolean): Promise<void>
deleteConfig(key: string): Promise<boolean>
eraseExpiredDocs(): Promise<DocBase<string>[]>
getConfig(key: string): Promise<string | undefined>
getMaxLocalIndex(): Promise<number>
isClosed(): boolean
listConfigKeys(): Promise<string[]>
queryDocs(queryToClean: Query<string[]>): Promise<DocBase<string>[]>
setConfig(key: string, value: string): Promise<void>
upsert<DocType extends DocBase<string>>(doc: DocType): Promise<DocType>