Properties
Collection
Collection<T, Key>: object
Type parameters
and
-
Parameters
-
filter: function
-
-
Parameters
Returns boolean
clone
-
Parameters
count
- count(): Promise<number>
- count<R>(thenShortcut: ThenShortcut<number, R>): Promise<R>
-
Returns Promise<number>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<number, R>
delete
-
Returns Promise<number>
distinct
-
each
- each(callback: function): Promise<void>
-
Parameters
-
callback: function
-
- (obj: T, cursor: object): any
-
Parameters
-
obj: T
-
cursor: object
-
key: IndexableType
-
primaryKey: Key
Returns any
eachKey
- eachKey(callback: function): Promise<void>
-
Parameters
-
callback: function
-
- (key: IndexableType, cursor: object): any
-
Parameters
-
key: IndexableType
-
cursor: object
-
key: IndexableType
-
primaryKey: Key
Returns any
eachPrimaryKey
- eachPrimaryKey(callback: function): Promise<void>
-
Parameters
-
callback: function
-
- (key: Key, cursor: object): any
-
Parameters
-
key: Key
-
cursor: object
-
key: IndexableType
-
primaryKey: Key
Returns any
eachUniqueKey
- eachUniqueKey(callback: function): Promise<void>
-
Parameters
-
callback: function
-
- (key: IndexableType, cursor: object): any
-
Parameters
-
key: IndexableType
-
cursor: object
-
key: IndexableType
-
primaryKey: Key
Returns any
filter
-
Parameters
-
filter: function
-
-
Parameters
Returns boolean
first
- first(): Promise<T | undefined>
- first<R>(thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
-
Returns Promise<T | undefined>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<T | undefined, R>
keys
- keys(): Promise<IndexableTypeArray>
- keys<R>(thenShortcut: ThenShortcut<IndexableTypeArray, R>): Promise<R>
-
Returns Promise<IndexableTypeArray>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<IndexableTypeArray, R>
last
- last(): Promise<T | undefined>
- last<R>(thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
-
Returns Promise<T | undefined>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<T | undefined, R>
limit
-
Parameters
modify
- modify(changeCallback: function): Promise<number>
- modify(changes: object): Promise<number>
-
Parameters
-
changeCallback: function
-
- (obj: T, ctx: object): void
Returns Promise<number>
-
Parameters
Returns Promise<number>
offset
-
Parameters
or
-
Parameters
primaryKeys
- primaryKeys(): Promise<Key[]>
- primaryKeys<R>(thenShortcut: ThenShortcut<Key[], R>): Promise<R>
-
Returns Promise<Key[]>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<Key[], R>
raw
-
reverse
-
sortBy
- sortBy(keyPath: string): Promise<T[]>
- sortBy<R>(keyPath: string, thenShortcut: ThenShortcut<T[], R>): Promise<R>
-
Parameters
-
Type parameters
Parameters
-
keyPath: string
-
thenShortcut: ThenShortcut<T[], R>
toArray
- toArray(): Promise<Array<T>>
- toArray<R>(thenShortcut: ThenShortcut<T[], R>): Promise<R>
-
Returns Promise<Array<T>>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<T[], R>
uniqueKeys
- uniqueKeys(): Promise<IndexableTypeArray>
- uniqueKeys<R>(thenShortcut: ThenShortcut<IndexableTypeArray, R>): Promise<R>
-
Returns Promise<IndexableTypeArray>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<IndexableTypeArray, R>
until
- until(filter: function, includeStopEntry?: undefined | false | true): Collection<T, Key>
-
Parameters
-
filter: function
-
-
Parameters
Returns boolean
-
Optional includeStopEntry: undefined | false | true
Table
Table<T, Key>: object
Type parameters
hook
name
name: string
schema
add
-
Parameters
-
item: T
-
Optional key: Key
bulkAdd
- bulkAdd(items: T[], keys?: IndexableTypeArrayReadonly): Promise<Key>
-
Parameters
-
items: T[]
-
Optional keys: IndexableTypeArrayReadonly
bulkDelete
- bulkDelete(keys: IndexableTypeArrayReadonly): Promise<void>
-
Parameters
-
keys: IndexableTypeArrayReadonly
bulkPut
- bulkPut(items: T[], keys?: IndexableTypeArrayReadonly): Promise<Key>
-
Parameters
-
items: T[]
-
Optional keys: IndexableTypeArrayReadonly
clear
-
count
- count(): Promise<number>
- count<R>(thenShortcut: ThenShortcut<number, R>): Promise<R>
-
Returns Promise<number>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<number, R>
delete
-
Parameters
each
- each(callback: function): Promise<void>
-
Parameters
-
callback: function
-
- (obj: T, cursor: object): any
-
Parameters
-
obj: T
-
cursor: object
-
key: IndexableType
-
primaryKey: Key
Returns any
filter
-
Parameters
-
fn: function
-
-
Parameters
Returns boolean
get
- get(key: Key): Promise<T | undefined>
- get<R>(key: Key, thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
- get(equalityCriterias: object): Promise<T | undefined>
- get<R>(equalityCriterias: object, thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
-
Parameters
Returns Promise<T | undefined>
-
Type parameters
Parameters
-
key: Key
-
thenShortcut: ThenShortcut<T | undefined, R>
-
Parameters
-
equalityCriterias: object
-
[key: string]: IndexableType
Returns Promise<T | undefined>
-
Type parameters
Parameters
-
equalityCriterias: object
-
[key: string]: IndexableType
-
thenShortcut: ThenShortcut<T | undefined, R>
limit
-
Parameters
mapToClass
- mapToClass(constructor: Function): Function
-
Parameters
Returns Function
offset
-
Parameters
orderBy
- orderBy(index: string | string[]): Collection<T, Key>
-
Parameters
put
-
Parameters
-
item: T
-
Optional key: Key
reverse
-
toArray
- toArray(): Promise<Array<T>>
- toArray<R>(thenShortcut: ThenShortcut<T[], R>): Promise<R>
-
Returns Promise<Array<T>>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<T[], R>
toCollection
-
update
- update(key: Key, changes: object): Promise<number>
-
Parameters
Returns Promise<number>
where
- where(index: string | string[]): WhereClause<T, Key>
- where(equalityCriterias: object): Collection<T, Key>
-
Parameters
-
Parameters
-
equalityCriterias: object
-
[key: string]: IndexableType
Transaction
Transaction: object
active
active: boolean
db
db: Dexie
idbtrans
idbtrans: IDBTransaction
mode
mode: string
on
storeNames
storeNames: Array<string>
tables
tables: object
Type declaration
-
[type: string]: Table<any, any>
abort
-
Returns void
table
- table(tableName: string): Table<any, any>
- table<T>(tableName: string): Table<T, any>
- table<T, Key>(tableName: string): Table<T, Key>
-
Parameters
Returns Table<any, any>
-
Type parameters
Parameters
Returns Table<T, any>
-
Type parameters
Parameters
Returns Table<T, Key>
Version
Version: object
stores
-
Parameters
-
schema: object
-
[key: string]: string | null
upgrade
-
Parameters
WhereClause
WhereClause<T, Key>: object
Type parameters
above
-
Parameters
aboveOrEqual
- aboveOrEqual(key: IndexableType): Collection<T, Key>
-
Parameters
anyOf
- anyOf(keys: IndexableTypeArrayReadonly): Collection<T, Key>
- anyOf(...keys: IndexableTypeArray): Collection<T, Key>
-
Parameters
-
keys: IndexableTypeArrayReadonly
-
Parameters
-
Rest ...keys: IndexableTypeArray
anyOfIgnoreCase
- anyOfIgnoreCase(keys: string[]): Collection<T, Key>
- anyOfIgnoreCase(...keys: string[]): Collection<T, Key>
-
Parameters
-
Parameters
below
-
Parameters
belowOrEqual
- belowOrEqual(key: IndexableType): Collection<T, Key>
-
Parameters
between
- between(lower: IndexableType, upper: IndexableType, includeLower?: undefined | false | true, includeUpper?: undefined | false | true): Collection<T, Key>
-
Parameters
-
lower: IndexableType
-
upper: IndexableType
-
Optional includeLower: undefined | false | true
-
Optional includeUpper: undefined | false | true
equals
-
Parameters
equalsIgnoreCase
-
Parameters
inAnyRange
- inAnyRange(ranges: Array<IndexableTypeArrayReadonly>): Collection<T, Key>
-
Parameters
-
ranges: Array<IndexableTypeArrayReadonly>
noneOf
- noneOf(keys: Array<IndexableType>): Collection<T, Key>
-
Parameters
-
keys: Array<IndexableType>
notEqual
-
Parameters
startsWith
-
Parameters
startsWithAnyOf
- startsWithAnyOf(prefixes: string[]): Collection<T, Key>
- startsWithAnyOf(...prefixes: string[]): Collection<T, Key>
-
Parameters
-
Parameters
-
Rest ...prefixes: string[]
startsWithAnyOfIgnoreCase
- startsWithAnyOfIgnoreCase(prefixes: string[]): Collection<T, Key>
- startsWithAnyOfIgnoreCase(...prefixes: string[]): Collection<T, Key>
-
Parameters
-
Parameters
-
Rest ...prefixes: string[]
startsWithIgnoreCase
- startsWithIgnoreCase(key: string): Collection<T, Key>
-
Parameters
Private _account
_account
: DataType<"ACCOUNT"> = Address.ZERO
Private _blockTimeout
_blockTimeout: Timeout | undefined
Private _latestBlock
_latest
Block: DataType<"LATEST_BLOCK"> = undefined
Private _turnSeed
_turn
Seed: DataType<"TURN_SEED"> = new BigNumber(0)
Private emitter
emitter: EventEmitter = new EventEmitter()
Private hooks
hooks: object
Type declaration
-
[name: string]: function[]
Readonly name
name: string
Readonly tables
tables
: Table<any, any>[]
Readonly verno
verno: number
Static Events
Events: any
Static IndexSpec
IndexSpec: object
Static Promise
Static TableSchema
TableSchema: object
Static addons
addons: Array<function>
Static currentTransaction
Static default
default: Dexie
Static dependencies
dependencies: object
Type declaration
-
IDBKeyRange: IDBKeyRange
-
indexedDB: IDBFactory
Static errnames
errnames: object
Type declaration
-
Abort: "AbortError"
-
Constraint: "ConstraintError"
-
Data: "DataError"
-
DataClone: "DataCloneError"
-
DatabaseClosed: "DatabaseClosedError"
-
Internal: "InternalError"
-
InvalidAccess: "InvalidAccessError"
-
InvalidArgument: "InvalidArgumentError"
-
InvalidState: "InvalidStateError"
-
InvalidTable: "InvalidTableError"
-
MissingAPI: "MissingAPIError"
-
Modify: "ModifyError"
-
NoSuchDatabase: "NoSuchDatabaseError"
-
NotFound: "NotFoundError"
-
OpenFailed: "OpenFailedError"
-
QuotaExceeded: "QuotaExceededError"
-
ReadOnly: "ReadOnlyError"
-
Schema: "SchemaError"
-
SubTransaction: "Error"
-
Syntax: "SyntaxError"
-
Timeout: "TimeoutError"
-
TransactionInactive: "TransactionInactiveError"
-
Unknown: "UnknownError"
-
Unsupported: "UnsupportedError"
-
Upgrade: "UpgradeError"
-
Version: "VersionError"
-
VersionChange: "VersionChangeError"
Static maxKey
maxKey: Array<Array<void>> | string
Static minKey
minKey: number
Static semVer
semVer: string
Static version
version: number
Class extending default Dexie database and implementing DatabaseContext interface, which handles all user data stored or cached locally in browser.