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.
DbProvider is a placeholder in this release — it is not implemented. Every method, including the constructor, throws a WativeError with code === "UNSUPPORTED_OP" and the message "not implemented in v2.0; use HybridProvider". new DbProvider(connectionString) throws immediately, so it cannot back a Workspace today. It is documented here only because the class is present on the public surface.
Signature
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: