Properties
Collection
Collection<T, Key>: object
Type parameters
and
- and(filter: function): Collection<T, Key>
-
Parameters
-
filter: function
-
-
Parameters
Returns boolean
Returns Collection<T, Key>
clone
- clone(props?: Object): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
count
- count(): Promise<number>
- count<R>(thenShortcut: ThenShortcut<number, R>): Promise<R>
-
Returns Promise<number>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<number, R>
Returns Promise<R>
delete
- delete(): Promise<number>
-
Returns Promise<number>
distinct
- distinct(): Collection<T, Key>
-
Returns Collection<T, Key>
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
Returns Promise<void>
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
Returns Promise<void>
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
Returns Promise<void>
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
Returns Promise<void>
filter
- filter(filter: function): Collection<T, Key>
-
Parameters
-
filter: function
-
-
Parameters
Returns boolean
Returns Collection<T, Key>
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>
Returns Promise<R>
keys
- keys(): Promise<IndexableTypeArray>
- keys<R>(thenShortcut: ThenShortcut<IndexableTypeArray, R>): Promise<R>
-
Returns Promise<IndexableTypeArray>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<IndexableTypeArray, R>
Returns Promise<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>
Returns Promise<R>
limit
- limit(n: number): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
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
- offset(n: number): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
or
- or(indexOrPrimayKey: string): WhereClause<T, Key>
-
Parameters
Returns WhereClause<T, Key>
primaryKeys
- primaryKeys(): Promise<Key[]>
- primaryKeys<R>(thenShortcut: ThenShortcut<Key[], R>): Promise<R>
-
Returns Promise<Key[]>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<Key[], R>
Returns Promise<R>
raw
- raw(): Collection<T, Key>
-
Returns Collection<T, Key>
reverse
- reverse(): Collection<T, Key>
-
Returns Collection<T, Key>
sortBy
- sortBy(keyPath: string): Promise<T[]>
- sortBy<R>(keyPath: string, thenShortcut: ThenShortcut<T[], R>): Promise<R>
-
Parameters
Returns Promise<T[]>
-
Type parameters
Parameters
-
keyPath: string
-
thenShortcut: ThenShortcut<T[], R>
Returns Promise<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>
Returns Promise<R>
uniqueKeys
- uniqueKeys(): Promise<IndexableTypeArray>
- uniqueKeys<R>(thenShortcut: ThenShortcut<IndexableTypeArray, R>): Promise<R>
-
Returns Promise<IndexableTypeArray>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<IndexableTypeArray, R>
Returns Promise<R>
until
- until(filter: function, includeStopEntry?: boolean): Collection<T, Key>
-
Parameters
-
filter: function
-
-
Parameters
Returns boolean
-
Optional includeStopEntry: boolean
Returns Collection<T, Key>
Table
Table<T, Key>: object
Type parameters
hook
hook: TableHooks<T, Key>
name
name: string
schema
schema: TableSchema
add
- add(item: T, key?: Key): Promise<Key>
-
Parameters
-
item: T
-
Optional key: Key
Returns Promise<Key>
bulkAdd
- bulkAdd(items: T[], keys?: IndexableTypeArrayReadonly): Promise<Key>
-
Parameters
-
items: T[]
-
Optional keys: IndexableTypeArrayReadonly
Returns Promise<Key>
bulkDelete
- bulkDelete(keys: IndexableTypeArrayReadonly): Promise<void>
-
Parameters
-
keys: IndexableTypeArrayReadonly
Returns Promise<void>
bulkPut
- bulkPut(items: T[], keys?: IndexableTypeArrayReadonly): Promise<Key>
-
Parameters
-
items: T[]
-
Optional keys: IndexableTypeArrayReadonly
Returns Promise<Key>
clear
-
Returns Promise<void>
count
- count(): Promise<number>
- count<R>(thenShortcut: ThenShortcut<number, R>): Promise<R>
-
Returns Promise<number>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<number, R>
Returns Promise<R>
delete
- delete(key: Key): Promise<void>
-
Parameters
Returns Promise<void>
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
Returns Promise<void>
filter
- filter(fn: function): Collection<T, Key>
-
Parameters
-
fn: function
-
-
Parameters
Returns boolean
Returns Collection<T, Key>
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>
Returns Promise<R>
-
Parameters
-
equalityCriterias: object
-
[key: string]: IndexableType
Returns Promise<T | undefined>
-
Type parameters
Parameters
-
equalityCriterias: object
-
[key: string]: IndexableType
-
thenShortcut: ThenShortcut<T | undefined, R>
Returns Promise<R>
limit
- limit(n: number): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
mapToClass
- mapToClass(constructor: Function): Function
-
Parameters
Returns Function
offset
- offset(n: number): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
orderBy
- orderBy(index: string | string[]): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
put
- put(item: T, key?: Key): Promise<Key>
-
Parameters
-
item: T
-
Optional key: Key
Returns Promise<Key>
reverse
- reverse(): Collection<T, Key>
-
Returns Collection<T, Key>
toArray
- toArray(): Promise<Array<T>>
- toArray<R>(thenShortcut: ThenShortcut<T[], R>): Promise<R>
-
Returns Promise<Array<T>>
-
Type parameters
Parameters
-
thenShortcut: ThenShortcut<T[], R>
Returns Promise<R>
toCollection
- toCollection(): Collection<T, Key>
-
Returns Collection<T, Key>
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
Returns WhereClause<T, Key>
-
Parameters
-
equalityCriterias: object
-
[key: string]: IndexableType
Returns Collection<T, Key>
Transaction
Transaction: object
active
active: boolean
db
db: Dexie
idbtrans
idbtrans: IDBTransaction
mode
mode: string
on
on: TransactionEvents
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
- stores(schema: object): Version
-
Parameters
-
schema: object
-
[key: string]: string | null
Returns Version
upgrade
- upgrade(fn: function): Version
-
Parameters
-
fn: function
-
- (trans: Transaction): void
Returns Version
WhereClause
WhereClause<T, Key>: object
Type parameters
above
- above(key: IndexableType): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
aboveOrEqual
- aboveOrEqual(key: IndexableType): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
anyOf
- anyOf(keys: IndexableTypeArrayReadonly): Collection<T, Key>
- anyOf(...keys: IndexableTypeArray): Collection<T, Key>
-
Parameters
-
keys: IndexableTypeArrayReadonly
Returns Collection<T, Key>
-
Parameters
-
Rest ...keys: IndexableTypeArray
Returns Collection<T, Key>
anyOfIgnoreCase
- anyOfIgnoreCase(keys: string[]): Collection<T, Key>
- anyOfIgnoreCase(...keys: string[]): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
below
- below(key: IndexableType): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
belowOrEqual
- belowOrEqual(key: IndexableType): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
between
- between(lower: IndexableType, upper: IndexableType, includeLower?: boolean, includeUpper?: boolean): Collection<T, Key>
-
Parameters
-
lower: IndexableType
-
upper: IndexableType
-
Optional includeLower: boolean
-
Optional includeUpper: boolean
Returns Collection<T, Key>
equals
- equals(key: IndexableType): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
equalsIgnoreCase
- equalsIgnoreCase(key: string): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
inAnyRange
- inAnyRange(ranges: Array<IndexableTypeArrayReadonly>): Collection<T, Key>
-
Parameters
-
ranges: Array<IndexableTypeArrayReadonly>
Returns Collection<T, Key>
noneOf
- noneOf(keys: Array<IndexableType>): Collection<T, Key>
-
Parameters
-
keys: Array<IndexableType>
Returns Collection<T, Key>
notEqual
- notEqual(key: IndexableType): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
startsWith
- startsWith(key: string): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
startsWithAnyOf
- startsWithAnyOf(prefixes: string[]): Collection<T, Key>
- startsWithAnyOf(...prefixes: string[]): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
-
Parameters
-
Rest ...prefixes: string[]
Returns Collection<T, Key>
startsWithAnyOfIgnoreCase
- startsWithAnyOfIgnoreCase(prefixes: string[]): Collection<T, Key>
- startsWithAnyOfIgnoreCase(...prefixes: string[]): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
-
Parameters
-
Rest ...prefixes: string[]
Returns Collection<T, Key>
startsWithIgnoreCase
- startsWithIgnoreCase(key: string): Collection<T, Key>
-
Parameters
Returns Collection<T, Key>
on
on: DbEvents
tables
tables: Table<any, any>[]
Static Events
Events: any
Static IndexSpec
IndexSpec: object
Static Promise
Promise: DexiePromiseConstructor
Static TableSchema
TableSchema: object
Static addons
addons: Array<function>
Static currentTransaction
currentTransaction: Transaction
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