IDBPCursor
interface IDBPCursor <DBTypes extends DBSchema | unknown = unknown, TxStores extends ArrayLike<StoreNames<DBTypes>> = ArrayLike<StoreNames<DBTypes>>, StoreName extends StoreNames<DBTypes> = StoreNames<DBTypes>, IndexName extends IndexNames<DBTypes, StoreName> | unknown = unknown, Mode extends IDBTransactionMode = "readonly"> extends IDBPCursorExtends {
delete: Mode extends "readonly" ? undefined : () => Promise<void>;
readonly key: CursorKey<DBTypes, StoreName, IndexName>;
readonly primaryKey: StoreKey<DBTypes, StoreName>;
readonly source: CursorSource<DBTypes, TxStores, StoreName, IndexName, Mode>;
update: Mode extends "readonly" ? undefined : (value: StoreValue<DBTypes, StoreName>) => Promise<StoreKey<DBTypes, StoreName>>;
[[Symbol.asyncIterator]](): AsyncIterableIterator<IDBPCursorIteratorValue<DBTypes, TxStores, StoreName, IndexName, Mode>>;
advance<T>(this: T, count: number): Promise<T | null>;
continue<T>(this: T, key?: CursorKey<DBTypes, StoreName, IndexName>): Promise<T | null>;
continuePrimaryKey<T>(
}this: T,
key: CursorKey<DBTypes, StoreName, IndexName>,
primaryKey: StoreKey<DBTypes, StoreName>,
): Promise<T | null>;§Type Parameters
§
TxStores extends ArrayLike<StoreNames<DBTypes>> = ArrayLike<StoreNames<DBTypes>>
[src]§
StoreName extends StoreNames<DBTypes> = StoreNames<DBTypes>
[src]§
IndexName extends IndexNames<DBTypes, StoreName> | unknown = unknown
[src]§Properties
§
readonly key: CursorKey<DBTypes, StoreName, IndexName>
[src]The key of the current index or object store item.
§
readonly source: CursorSource<DBTypes, TxStores, StoreName, IndexName, Mode>
[src]Returns the IDBObjectStore or IDBIndex the cursor was opened from.
§
update: Mode extends "readonly" ? undefined : (value: StoreValue<DBTypes, StoreName>) => Promise<StoreKey<DBTypes, StoreName>>
[src]Updated the current record.
§Methods
§
[[Symbol.asyncIterator]](): AsyncIterableIterator<IDBPCursorIteratorValue<DBTypes, TxStores, StoreName, IndexName, Mode>>
[src]Iterate over the cursor.
§
advance<T>(this: T, count: number): Promise<T | null>
[src]Advances the cursor a given number of records.
Resolves to null if no matching records remain.
§
continue<T>(this: T, key?: CursorKey<DBTypes, StoreName, IndexName>): Promise<T | null>
[src]Advance the cursor by one record (unless 'key' is provided).
Resolves to null if no matching records remain.
@param key
Advance to the index or object store with a key equal to or greater than this value.
§
continuePrimaryKey<T>(
[src]this: T,
key: CursorKey<DBTypes, StoreName, IndexName>,
primaryKey: StoreKey<DBTypes, StoreName>,
): Promise<T | null>Advance the cursor by given keys.
The operation is 'and' – both keys must be satisfied.
Resolves to null if no matching records remain.
@param key
Advance to the index or object store with a key equal to or greater than this value.
@param primaryKey
and where the object store has a key equal to or greater than this value.