Skip to main content
Module

x/earthstar/src/entries/npm.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.0.2/src/entries/npm.ts";

Constructors

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

Properties

private
closed: boolean
private
db
private
gotInitialMaxLocalIndex
private
localMaxLocalIndex

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>