interface IDBTransaction
implements EventTarget
import { type IDBTransaction } from "https://deno.land/x/indexeddb@1.3.5/ponyfill_memory.ts";
Properties
readonly
db: IDBDatabaseReturns the transaction's connection.
readonly
error: DOMException | nullIf the transaction was aborted, returns the error (a DOMException) providing the reason.
Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
readonly
objectStoreNames: DOMStringListReturns 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
oncomplete: ((this: IDBTransaction, ev: Event) => any) | null
onerror: ((this: IDBTransaction, ev: Event) => any) | null
prototype: IDBTransaction
Methods
Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
objectStore(name: string): IDBObjectStore
Returns an IDBObjectStore in the transaction's scope.
addEventListener<K extends keyof IDBTransactionEventMap>(): void
type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
removeEventListener<K extends keyof IDBTransactionEventMap>(): void
type: K,
listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any,
options?: boolean | EventListenerOptions,
new(): IDBTransaction