IdbTransaction Class
A transaction (https://w3c.github.io/IndexedDB/#transaction).
public sealed class IdbTransaction : EventTarget- Inheritance
EventTargetIdbTransaction
Properties
| Name | Description |
|---|---|
| Db | Gets the connection of the transaction. |
| Durability | Gets the durability hint of the transaction. |
| Error | Gets the error of an aborted transaction, or null. |
| Mode | Gets the mode of the transaction. |
| ObjectStoreNames | Gets the sorted names of the object stores of the scope. |
| OnAbort | The event handler of the abort events. |
| OnComplete | The event handler of the complete events. |
| OnError | The event handler of the error events. |
Gets the connection of the transaction.
public IdbDatabase Db { get; }Durability
IdbTransaction.csGets the durability hint of the transaction.
public IdbTransactionDurability Durability { get; }Property value
See also
Error
IdbTransaction.csGets the error of an aborted transaction, or null.
public DomException? Error { get; }Gets the mode of the transaction.
public IdbTransactionMode Mode { get; }ObjectStoreNames
IdbTransaction.csGets the sorted names of the object stores of the scope.
public DomStringList ObjectStoreNames { get; }Property value
See also
OnAbort
IdbTransaction.csThe event handler of the abort events.
OnComplete
IdbTransaction.csThe event handler of the complete events.
OnError
IdbTransaction.csThe event handler of the error events.
Methods
| Name | Description |
|---|---|
| Abort() | Aborts the transaction (https://w3c.github.io/IndexedDB/#dom-idbtransaction-abort). |
| Commit() | Commits the transaction without waiting for the events of the pending requests (https://w3c.github.io/IndexedDB/#dom-idbtransaction-commit). |
| ObjectStore(string) | Returns the object store handle of an object store of the scope (https://w3c.github.io/IndexedDB/#dom-idbtransaction-objectstore). |
Abort()
IdbTransaction.csAborts the transaction (https://w3c.github.io/IndexedDB/#dom-idbtransaction-abort).
public void Abort()Commit()
IdbTransaction.csCommits the transaction without waiting for the events of the pending requests (https://w3c.github.io/IndexedDB/#dom-idbtransaction-commit).
public void Commit()ObjectStore(string)
IdbTransaction.csReturns the object store handle of an object store of the scope (https://w3c.github.io/IndexedDB/#dom-idbtransaction-objectstore).
public IdbObjectStore ObjectStore(string name)