Struct idb::Transaction

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

Provides a static, asynchronous transaction on a database. All reading and writing of data is done within transactions.

Implementations§

Returns a list of the names of object stores in the transaction’s scope. For an upgrade transaction this is all object stores in the database.

Returns the mode the transaction was created with (“readonly” or “readwrite”), or “versionchange” for an upgrade transaction.

Returns the transaction’s connection.

If the transaction was aborted, returns the error (a DOMException) providing the reason.

Returns an ObjectStore in the transaction’s scope.

Waits for the transaction to complete.

Attempts to commit the transaction. All pending requests will be allowed to complete, but no new requests will be accepted. This can be used to force a transaction to quickly finish, without waiting for pending requests to fire success events before attempting to commit normally.

Aborts the transaction. All pending requests will fail and all changes made to the database will be reverted.

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.