Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T = unknown

Hierarchy

  • ReactiveIDBObjectStore

Index

Constructors

constructor

Properties

Readonly transaction

Readonly transformer

transformer: ReactiveIDBTransformer<T> = ...

Accessors

autoIncrement

  • get autoIncrement(): boolean

indexNames

  • get indexNames(): DOMStringList

keyPath

  • get keyPath(): null | string | string[]

name

  • get name(): string

Methods

add$

  • add$(value: T, key?: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey): Observable<IDBValidKey>
  • Adds or updates a record in store with the given value and key.

    If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.

    If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.

    If successful, request's result will be the record's key.

    Parameters

    • value: T
    • Optional key: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey

    Returns Observable<IDBValidKey>

clear$

  • clear$(): Observable<undefined>

count$

  • count$(key?: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange): Observable<number>
  • Retrieves the number of records matching the given key or key range in query.

    Parameters

    • Optional key: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange

    Returns Observable<number>

delete$

  • delete$(key: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange): Observable<undefined>
  • Deletes records in store with the given key or in the given key range in query.

    If successful, request's result will be undefined.

    Parameters

    • key: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange

    Returns Observable<undefined>

get$

  • get$(query: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange): Observable<undefined | T>
  • Retrieves the value of the first record matching the given key or key range in query.

    If successful, request's result will be the value, or undefined if there was no matching record.

    Parameters

    • query: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange

    Returns Observable<undefined | T>

getAll$

  • getAll$(query?: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange, count?: number): Observable<T[]>
  • Retrieves the values of the records matching the given key or key range in query (up to count if given).

    If successful, request's result will be an Array of the values.

    Parameters

    • Optional query: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange
    • Optional count: number

    Returns Observable<T[]>

getAllKeys$

  • getAllKeys$(query?: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange, count?: number): Observable<IDBValidKey[]>
  • Retrieves the keys of records matching the given key or key range in query (up to count if given).

    If successful, request's result will be an Array of the keys.

    Parameters

    • Optional query: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange
    • Optional count: number

    Returns Observable<IDBValidKey[]>

getKey$

  • getKey$(query: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange): Observable<undefined | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey>
  • Retrieves the key of the first record matching the given key or key range in query.

    If successful, request's result will be the key, or undefined if there was no matching record.

    Parameters

    • query: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange

    Returns Observable<undefined | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey>

index

openCursor$

  • openCursor$(query?: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange, direction?: "next" | "nextunique" | "prev" | "prevunique"): Observable<null | IDBCursorWithValue>
  • Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.

    If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.

    Parameters

    • Optional query: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange
    • Optional direction: "next" | "nextunique" | "prev" | "prevunique"

    Returns Observable<null | IDBCursorWithValue>

openKeyCursor$

  • openKeyCursor$(query?: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange, direction?: "next" | "nextunique" | "prev" | "prevunique"): Observable<null | IDBCursor>
  • Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.

    If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.

    Parameters

    • Optional query: null | string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey | IDBKeyRange
    • Optional direction: "next" | "nextunique" | "prev" | "prevunique"

    Returns Observable<null | IDBCursor>

put$

  • put$(value: T, key?: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey): Observable<IDBValidKey>
  • Adds or updates a record in store with the given value and key.

    If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.

    If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.

    If successful, request's result will be the record's key.

    Parameters

    • value: T
    • Optional key: string | number | Date | ArrayBufferView | ArrayBuffer | IDBArrayKey

    Returns Observable<IDBValidKey>

Generated using TypeDoc