Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TransactionHandle<StoreTypes>

Type parameters

  • StoreTypes: Store<string, any>

Hierarchy

  • TransactionHandle

Index

Constructors

constructor

  • new TransactionHandle<StoreTypes>(tx: IDBTransaction): TransactionHandle<StoreTypes>
  • Type parameters

    • StoreTypes: Store<string, any, StoreTypes>

    Parameters

    • tx: IDBTransaction

    Returns TransactionHandle<StoreTypes>

Methods

add

  • add<S>(store: S, value: StoreContent<S>, key?: any): Promise<any>
  • Type parameters

    • S: Store<string, any, S>

    Parameters

    • store: S
    • value: StoreContent<S>
    • Optional key: any

    Returns Promise<any>

delete

  • delete<St>(store: InferStore<St>, key: any): Promise<void>
  • Type parameters

    • St: Store<string, any, St>

    Parameters

    • store: InferStore<St>
    • key: any

    Returns Promise<void>

get

  • get<S>(store: S, key: any): Promise<undefined | StoreContent<S>>
  • Type parameters

    • S: Store<string, any, S>

    Parameters

    • store: S
    • key: any

    Returns Promise<undefined | StoreContent<S>>

getIndexed

  • getIndexed<St, Ind>(index: InferIndex<Ind>, key: any): Promise<undefined | IndexRecord<Ind>>
  • Type parameters

    • St: Store<string, any, St>

    • Ind: Index<StoreName<St>, string, any, any, Ind>

    Parameters

    • index: InferIndex<Ind>
    • key: any

    Returns Promise<undefined | IndexRecord<Ind>>

iter

  • iter<St>(store: St, key?: any): ResultStream<StoreContent<St>>
  • Type parameters

    • St: Store<string, any, St>

    Parameters

    • store: St
    • Optional key: any

    Returns ResultStream<StoreContent<St>>

iterIndexed

  • iterIndexed<St, Ind>(index: Ind, key?: any): ResultStream<IndexRecord<Ind>>
  • Type parameters

    • St: Store<string, any, St>

    • Ind: Index<StoreName<St>, string, any, any, Ind>

    Parameters

    • index: Ind
    • Optional key: any

    Returns ResultStream<IndexRecord<Ind>>

mutate

  • mutate<St>(store: InferStore<St>, key: any, f: (x: StoreContent<St>) => undefined | StoreContent<St>): Promise<void>
  • Type parameters

    • St: Store<string, any, St>

    Parameters

    • store: InferStore<St>
    • key: any
    • f: (x: StoreContent<St>) => undefined | StoreContent<St>
        • (x: StoreContent<St>): undefined | StoreContent<St>
        • Parameters

          • x: StoreContent<St>

          Returns undefined | StoreContent<St>

    Returns Promise<void>

put

  • put<S>(store: S, value: StoreContent<S>, key?: any): Promise<any>
  • Type parameters

    • S: Store<string, any, S>

    Parameters

    • store: S
    • value: StoreContent<S>
    • Optional key: any

    Returns Promise<any>

Generated using TypeDoc