Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ReactiveIDBDatabase

Index

Constructors

constructor

Accessors

name

  • get name(): string

objectStoreNames

  • get objectStoreNames(): DOMStringList

version

  • get version(): number

Methods

addEventListener

  • addEventListener<K>(type: K, listener: (ev: IDBDatabaseEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void
  • Type parameters

    • K: "versionchange" | "abort" | "close" | "error"

    Parameters

    • type: K
    • listener: (ev: IDBDatabaseEventMap[K]) => void
        • (ev: IDBDatabaseEventMap[K]): void
        • Parameters

          • ev: IDBDatabaseEventMap[K]

          Returns void

    • Optional options: boolean | AddEventListenerOptions

    Returns void

clear$

  • clear$(onBlocked?: (event: Event) => void): Observable<void>
  • Parameters

    • Optional onBlocked: (event: Event) => void
        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns Observable<void>

close

  • close(): void

createObjectStore

  • Creates a new object store with the given name and options and returns a new IDBObjectStore.

    Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.

    Parameters

    • name: string
    • Optional options: IDBObjectStoreParameters

    Returns ReactiveIDBObjectStore<unknown>

deleteObjectStore

  • deleteObjectStore(name: string): void
  • Deletes the object store with the given name.

    Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.

    Parameters

    • name: string

    Returns void

removeEventListener

  • removeEventListener<K>(type: K, listener: (ev: IDBDatabaseEventMap[K]) => void, options?: boolean | EventListenerOptions): void
  • Type parameters

    • K: "versionchange" | "abort" | "close" | "error"

    Parameters

    • type: K
    • listener: (ev: IDBDatabaseEventMap[K]) => void
        • (ev: IDBDatabaseEventMap[K]): void
        • Parameters

          • ev: IDBDatabaseEventMap[K]

          Returns void

    • Optional options: boolean | EventListenerOptions

    Returns void

transaction

  • transaction(names: string | string[], mode?: "readonly" | "readwrite" | "versionchange"): ReactiveIDBTransaction
  • Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.

    Parameters

    • names: string | string[]
    • Optional mode: "readonly" | "readwrite" | "versionchange"

    Returns ReactiveIDBTransaction

transaction$

  • transaction$(names: string | string[], mode?: "readonly" | "readwrite" | "versionchange"): Observable<ReactiveIDBTransaction>

Static create

Generated using TypeDoc