-
Notifications
You must be signed in to change notification settings - Fork 69
Commit 7c40323
authored
Closes #206 #130
WPT coverage:
getAllRecords():
//IndexedDB/idbobjectstore_getAllRecords.tentative.any.js
//IndexedDB/idbindex_getAllRecords.tentative.any.js
getAll()/getAllKey() direction option:
//IndexedDB/idbobjectstore_getAllKeys-options.tentative.any.js
//IndexedDB/idbindex_getAllKeys-options.tentative.any.js
//IndexedDB/idbobjectstore_getAll-options.tentative.any.js
//IndexedDB/idbindex_getAll-options.tentative.any.js
Implementation commitment:
WebKit (TBD)
Chromium (https://issues.chromium.org/issues/40746016)
Gecko (TBD)
Outline of change:
Potentially valid key range
Added to support overloading getAll()/getAllKeys() with IDBGetAllOptions as the first argument. Preserves existing behavior for key ranges and keys. Avoids parsing the first argument for getAll()/getAllKeys() as a IDBGetAllOptions when the argument is a key range or has a type that could be a valid key (Number, String, Date, ArrayBuffer, or Array).
Record snapshot
Added for the output of getAllRecords(), which includes the record's key, value and primaryKey. For IDBIndex, key is the index key and primaryKey is the record's key. Required because object stores and indexes define different types of records.
getAll()/getAllKeys()
Methods updated to support overload of the first argument, which is either a key range or an IDBGetAllOptions. IDBGetAllOptions adds direction support.
getAllRecords()
New method added to both IDBObjectStore and IDBIndex. Supports IDBGetAllOptions only.
Retrieve multiple items from an object store/index
Algorithm updated to include more inputs: kind and direction. Kind determines the type of output, which is either keys, values or record snapshots. Direction determines the sorting of the output, which is either ascending or descending.
1 parent cd7c444 commit 7c40323Copy full SHA for 7c40323
File tree
Expand file treeCollapse file tree
1 file changed
+382
-213
lines changedFilter options
Expand file treeCollapse file tree
1 file changed
+382
-213
lines changed
0 commit comments