IDBTransaction
import { IDBTransaction } from "https://raw.githubusercontent.com/aaronhuggins/indexeddb/main/ponyfill.ts";
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
readonly error: DOMException | null;
readonly mode: IDBTransactionMode;
readonly objectStoreNames: DOMStringList;
onabort: ((this: IDBTransaction, ev: Event) => any) | null;
oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
onerror: ((this: IDBTransaction, ev: Event) => any) | null;
prototype: IDBTransaction;
abort(): void;
addEventListener<K extends keyof IDBTransactionEventMap>(
type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;commit(): void;
new (): IDBTransaction;
objectStore(name: string): IDBObjectStore;
removeEventListener<K extends keyof IDBTransactionEventMap>(
type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;removeEventListener(
}type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;const IDBTransaction;
§Properties
§
readonly db: IDBDatabase
[src]Returns the transaction's connection.
§
readonly error: DOMException | null
[src]If the transaction was aborted, returns the error (a DOMException) providing the reason.
§
readonly mode: IDBTransactionMode
[src]Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
§
readonly objectStoreNames: DOMStringList
[src]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.
§
onabort: ((this: IDBTransaction, ev: Event) => any) | null
[src]§
oncomplete: ((this: IDBTransaction, ev: Event) => any) | null
[src]§
onerror: ((this: IDBTransaction, ev: Event) => any) | null
[src]§
prototype: IDBTransaction
[src]§Methods
§
abort(): void
[src]Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
§
addEventListener<K extends keyof IDBTransactionEventMap>(
[src]type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void§
addEventListener(
[src]type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void§
new (): IDBTransaction
[src]§
objectStore(name: string): IDBObjectStore
[src]Returns an IDBObjectStore in the transaction's scope.
§
removeEventListener<K extends keyof IDBTransactionEventMap>(
[src]type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void