Properties
Collection
Collection<T, Key>: {}
Type parameters
and
- and(filter: (x: T) => boolean): Collection<T, Key>
-
Parameters
-
filter: (x: T) => boolean
-
-
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: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
-
Parameters
-
callback: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any
-
- (obj: T, cursor: { key: IndexableType; primaryKey: Key }): any
-
Parameters
-
obj: T
-
cursor: { key: IndexableType; primaryKey: Key }
-
key: IndexableType
-
primaryKey: Key
Returns any
eachKey
- eachKey(callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
-
Parameters
-
callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any
-
- (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }): any
-
Parameters
-
key: IndexableType
-
cursor: { key: IndexableType; primaryKey: Key }
-
key: IndexableType
-
primaryKey: Key
Returns any
eachPrimaryKey
- eachPrimaryKey(callback: (key: Key, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
-
Parameters
-
callback: (key: Key, cursor: { key: IndexableType; primaryKey: Key }) => any
-
- (key: Key, cursor: { key: IndexableType; primaryKey: Key }): any
-
Parameters
-
key: Key
-
cursor: { key: IndexableType; primaryKey: Key }
-
key: IndexableType
-
primaryKey: Key
Returns any
eachUniqueKey
- eachUniqueKey(callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
-
Parameters
-
callback: (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }) => any
-
- (key: IndexableType, cursor: { key: IndexableType; primaryKey: Key }): any
-
Parameters
-
key: IndexableType
-
cursor: { key: IndexableType; primaryKey: Key }
-
key: IndexableType
-
primaryKey: Key
Returns any
filter
- filter(filter: (x: T) => boolean): Collection<T, Key>
-
Parameters
-
filter: (x: T) => boolean
-
-
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: (obj: T, ctx: { value: T }) => void): Promise<number>
- modify(changes: {}): Promise<number>
-
Parameters
-
changeCallback: (obj: T, ctx: { value: T }) => void
-
- (obj: T, ctx: { value: T }): 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: (value: T) => boolean, includeStopEntry?: undefined | false | true): Collection<T, Key>
-
Parameters
-
filter: (value: T) => boolean
-
-
Parameters
Returns boolean
-
Optional includeStopEntry: undefined | false | true
Table
Table<T, Key>: {}
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: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any): Promise<void>
-
Parameters
-
callback: (obj: T, cursor: { key: IndexableType; primaryKey: Key }) => any
-
- (obj: T, cursor: { key: IndexableType; primaryKey: Key }): any
-
Parameters
-
obj: T
-
cursor: { key: IndexableType; primaryKey: Key }
-
key: IndexableType
-
primaryKey: Key
Returns any
filter
- filter(fn: (obj: T) => boolean): Collection<T, Key>
-
Parameters
-
fn: (obj: T) => boolean
-
-
Parameters
Returns boolean
get
- get(key: Key): Promise<T | undefined>
- get<R>(key: Key, thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
- get(equalityCriterias: {}): Promise<T | undefined>
- get<R>(equalityCriterias: {}, thenShortcut: ThenShortcut<T | undefined, R>): Promise<R>
-
Parameters
Returns Promise<T | undefined>
-
Type parameters
Parameters
-
key: Key
-
thenShortcut: ThenShortcut<T | undefined, R>
-
Parameters
-
equalityCriterias: {}
-
[key: string]: IndexableType
Returns Promise<T | undefined>
-
Type parameters
Parameters
-
equalityCriterias: {}
-
[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: {}): Promise<number>
-
Parameters
Returns Promise<number>
where
-
Parameters
-
Parameters
-
equalityCriterias: {}
-
[key: string]: IndexableType
Transaction
Transaction: {}
active
active: boolean
db
db: Dexie
idbtrans
idbtrans: IDBTransaction
mode
mode: string
on
storeNames
storeNames: Array<string>
tables
tables: {}
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: {}
stores
-
Parameters
-
schema: {}
-
[key: string]: string | null
upgrade
-
Parameters
WhereClause
WhereClause<T, Key>: {}
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
meta
meta
: Table<{ id
: 0; time
: number }, 0>
Readonly name
name: string
Readonly tables
tables
: Table<any, any>[]
Readonly verno
verno: number
Static Events
Events: any
Static IndexSpec
IndexSpec: {}
Static Promise
Static TableSchema
TableSchema: {}
Static addons
addons: Array<(db: Dexie) => void>
Static currentTransaction
Static default
default: Dexie
Static dependencies
dependencies: { IDBKeyRange: IDBKeyRange; indexedDB: IDBFactory }
Type declaration
-
IDBKeyRange: IDBKeyRange
-
indexedDB: IDBFactory
Static errnames
errnames: { 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" }
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