Skip to main content
Module

x/earthstar/mod.ts>ReplicaDriverSqlite

A specification and Javascript library for building online tools you can truly call your own.
Go to Latest
class ReplicaDriverSqlite
implements IReplicaDriver
import { ReplicaDriverSqlite } from "https://deno.land/x/earthstar@v9.3.3/mod.ts";

A strorage driver which persists to SQLite. Works in Deno and browsers.

Constructors

new
ReplicaDriverSqlite(opts: ReplicaSqliteOpts)

Properties

_db: Sqlite.DB
_filename: string
_isClosed: boolean
_maxLocalIndex: number

Methods

_getConfigSync(key: string): string | undefined
close(erase: boolean): Promise<void>
deleteConfig(key: string): Promise<boolean>
getConfig(key: string): Promise<string | undefined>
isClosed(): boolean
listConfigKeys(): Promise<string[]>
queryDocs(queryToClean: Query): Promise<Doc[]>
setConfig(key: string, content: string): Promise<void>
upsert(doc: Doc): Promise<Doc>