Storage ProvidersDbProvider

DbProvider

The DbProvider backend exported from the package root, for persisting a workspace's encrypted records to a database rather than the filesystem or IndexedDB.

DbProvider is exported from the package root (wative-core) and is reserved for a future SQL-backed provider — SQLite via SQLCipher, Postgres, and the like — so a workspace's encrypted records could live in a database rather than on the filesystem or in IndexedDB.

Signature

db-provider.ts
import { DbProvider } from "wative-core";

// Present on the surface, but this call throws WativeError("UNSUPPORTED_OP") today.
new DbProvider("postgres://…");

DbProvider extends the abstract Provider and its constructor takes a single connection-string argument. The stub throws before any of that takes effect, so no records, sessions, or options are available on it in this version.

What to use instead

If you need a database-backed store now, do not wait on DbProvider — write one yourself. The record framing and encryption are supplied by the base classes, so a database backend is usually a matter of moving sealed bytes into and out of rows:

Last updated on