IdbTransaction Class

A transaction (https://w3c.github.io/IndexedDB/#transaction).

public sealed class IdbTransaction : EventTarget
Inheritance
EventTarget IdbTransaction

Properties

NameDescription
DbGets the connection of the transaction.
DurabilityGets the durability hint of the transaction.
ErrorGets the error of an aborted transaction, or null.
ModeGets the mode of the transaction.
ObjectStoreNamesGets the sorted names of the object stores of the scope.
OnAbortThe event handler of the abort events.
OnCompleteThe event handler of the complete events.
OnErrorThe event handler of the error events.

Gets the connection of the transaction.

public IdbDatabase Db { get; }

Gets the durability hint of the transaction.

public IdbTransactionDurability Durability { get; }

Gets the error of an aborted transaction, or null.

public DomException? Error { get; }

Gets the mode of the transaction.

public IdbTransactionMode Mode { get; }

ObjectStoreNames

IdbTransaction.cs

Gets the sorted names of the object stores of the scope.

public DomStringList ObjectStoreNames { get; }

The event handler of the abort events.

public Action<Event>? OnAbort { get; set; }

The event handler of the complete events.

public Action<Event>? OnComplete { get; set; }

The event handler of the error events.

public Action<Event>? OnError { get; set; }

Methods

NameDescription
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).

Aborts the transaction (https://w3c.github.io/IndexedDB/#dom-idbtransaction-abort).

public void Abort()

Commits 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.cs

Returns the object store handle of an object store of the scope (https://w3c.github.io/IndexedDB/#dom-idbtransaction-objectstore).

public IdbObjectStore ObjectStore(string name)