In-memory storage adapter for Lix.
Data is stored only for the lifetime of the JavaScript context. When the page is refreshed or the application is closed, all data is lost.
new InMemoryStorage():
InMemoryStorage
InMemoryStorage
close():
Promise
<void
>
Closes the database connection.
Note: For in-memory databases, this just clears the reference. The data is lost when the database is no longer referenced.
Promise
<void
>
export():
Promise
<Blob
>
Exports the current database state as a blob.
Promise
<Blob
>
import(
blob
):Promise
<void
>
Imports data from a blob, replacing the current database content.
Blob
Promise
<void
>
open():
Promise
<SqliteWasmDatabase
>
Opens an in-memory SQLite database.
Creates a new empty lix if this is the first time opening. Returns the same database instance on subsequent calls.
Promise
<SqliteWasmDatabase
>