automerge-repo-storage-bun-sqlite
v0.1.2
Published
An automerge repo storage adapter that uses bun:sqlite to store documents.
Downloads
6
Readme
automerge-repo-bun-sqlite
An automerge repo storage adapter that uses bun:sqlite to store documents.
Usage
import { Repo } from "@automerge/automerge-repo";
import { BunSqliteStorageAdapter } from "@marionauta/automerge-repo-bun-sqlite";
import Database from "bun:sqlite";
const db = new Database("documents.db", { strict: true }); // strict is required
const repo = new Repo({
storage: new BunSqliteStorageAdapter(db),
// ...
});