open_storage

Function open_storage 

Source
pub async fn open_storage(name: &str) -> ChatResult<Connection>
Expand description

Open a SQLite connection backed by IndexedDB via the relaxed-idb VFS.

The relaxed-idb VFS keeps the database in memory and asynchronously flushes changed blocks to IndexedDB on every transaction commit. It requires PRAGMA synchronous = OFF.

On non-WASM targets this falls back to an in-memory connection so the crate can still be type-checked when consumed by bin crates on native.