Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Index<StoreName, IndexName, S, T>

Definition of an index.

Type parameters

  • StoreName: string

  • IndexName: string

  • S: IDBValidKey

  • T

Hierarchy

  • Index

Index

Constructors

constructor

  • new Index<StoreName, IndexName, S, T>(s: Store<StoreName, T>, indexName: IndexName, keyPath: string | string[], options?: IndexOptions): Index<StoreName, IndexName, S, T>
  • Type parameters

    • StoreName: string

    • IndexName: string

    • S: IDBValidKey

    • T

    Parameters

    • s: Store<StoreName, T>
    • indexName: IndexName
    • keyPath: string | string[]
    • Optional options: IndexOptions

    Returns Index<StoreName, IndexName, S, T>

Properties

Protected _dummyKey

_dummyKey: undefined | S

We want to have the key type parameter in use somewhere, because otherwise the compiler complains. In iterIndex the key type is pretty useful.

indexName

indexName: IndexName

keyPath

keyPath: string | string[]

options

options: IndexOptions

Options to use for the index.

storeName

storeName: string

Name of the store that this index is associated with.

Generated using TypeDoc