Struct idb_sys::Database

source ·
pub struct Database { /* private fields */ }
Expand description

Database provides a connection to a database; you can use an Database object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The object provides the only way to get and manage versions of the database.

Implementations§

Returns the name of the database.

Returns the version of the database.

Returns a list of the names of ObjectStores in the database.

Returns a new transaction with the given scope (which can be a single object store name or an array of names), mode (TransactionMode::ReadOnly or TransactionMode::ReadWrite).

Closes the connection once all running transactions have finished.

Creates a new object store with the given name and options and returns a new ObjectStore. Returns an Error if not called within an upgrade transaction.

Deletes the object store with the given name. Returns an Error if not called within an upgrade transaction.

Adds an event handler for abort event.

Adds an event handler for close event.

Adds an event handler for error event.

Adds an event handler for versionchange event.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.