Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IDBIndex

Hierarchy

  • IDBIndex

Index

Properties

keyPath

keyPath: string | string[]

multiEntry

multiEntry: boolean

name

name: string

Updates the name of the store to newName. Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.

objectStore

objectStore: IDBObjectStore

Returns the IDBObjectStore the index belongs to.

unique

unique: boolean

Methods

count

  • Retrieves the number of records matching the given key or key range in query. If successful, request's result will be the count.

    Parameters

    Returns IDBRequest<number>

get

  • 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

    Returns IDBRequest<any | undefined>

getAll

  • 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

    Returns IDBRequest<any[]>

getAllKeys

  • 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

    Returns IDBRequest<IDBValidKey[]>

getKey

  • 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

    Returns IDBRequest<IDBValidKey | undefined>

openCursor

  • Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched. If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.

    Parameters

    Returns IDBRequest<IDBCursorWithValue | null>

openKeyCursor

  • Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched. If successful, request's result will be an IDBCursor, or null if there were no matching records.

    Parameters

    Returns IDBRequest<IDBCursor | null>

Generated using TypeDoc