Class StagedTransaction<SCHEMA, STORES>
Type Parameters
-
SCHEMA
-
STORES extends (keyof SCHEMA)[]
Constructors
constructor
- new StagedTransaction<SCHEMA, STORES>(database: default<SCHEMA>, over: STORES, mode: IDBTransactionMode): StagedTransaction<SCHEMA, STORES>
-
Type Parameters
-
SCHEMA
-
STORES extends (keyof SCHEMA)[]
Parameters
-
database: default<SCHEMA>
-
over: STORES
-
mode: IDBTransactionMode
Methods
all
- all<KEY>(store: KEY): Promise<SCHEMA[KEY][]>
-
Type Parameters
-
KEY extends string | number | symbol
Returns Promise<SCHEMA[KEY][]>
- all<KEY>(store: KEY, range: string | IDBKeyRange, index: string): Promise<SCHEMA[KEY][]>
-
Type Parameters
-
KEY extends string | number | symbol
Parameters
-
store: KEY
-
range: string | IDBKeyRange
-
index: string
Returns Promise<SCHEMA[KEY][]>
await
- await(): Promise<void>
-
Returns Promise<void>
clear
- clear(store: keyof SCHEMA): Promise<void>
-
Returns Promise<void>
count
- count(store: keyof SCHEMA): Promise<number>
-
Returns Promise<number>
delete
- delete(store: keyof SCHEMA, key: string): Promise<void>
-
Parameters
-
store: keyof SCHEMA
-
key: string
Returns Promise<void>
get
- get<KEY>(store: KEY, key: string, index?: string): Promise<undefined | SCHEMA[KEY]>
-
Type Parameters
-
KEY extends string | number | symbol
Parameters
-
store: KEY
-
key: string
-
Optional
index: string
Returns Promise<undefined | SCHEMA[KEY]>
keys
- keys(store: keyof SCHEMA): Promise<string[]>
-
Returns Promise<string[]>
set
- set<KEY>(store: KEY, key: string, value: SCHEMA[KEY]): Promise<void>
-
Type Parameters
-
KEY extends string | number | symbol
Parameters
-
store: KEY
-
key: string
-
value: SCHEMA[KEY]
Returns Promise<void>
transaction
- transaction<T>(initialiser: Initialiser<SCHEMA, STORES, T>): Promise<T>
-
Returns Promise<T>