This feature adds the getAllRecords() API to IndexedDB's IDBObjectStore and IDBIndex. It also adds a direction parameter to getAll() and getAllKeys(). This functionality enables certain read patterns to be significantly faster when compared to the existing alternative of iteration with cursors. One key workload from a Microsoft property showed a 350ms improvement. getAllRecords() effectively combines getAllKeys() and getAll() by enumerating both primary keys and values at the same time. For an IDBIndex, getAllRecords() also provides the record's index key in addition to the primary key and value. getAllRecords() can optionally return records in either ascending or descending order. This option is also back-ported to the existing operations getAll() and getAllKeys().
Overloading getAll() and getAllKeys() to accept the IDBGetAllOptions dictionary introduces compatibility risk. Prior to this proposal, when passed a dictionary argument, both getAll() and getAllKeys() throw an exception after failing to convert the dictionary to a key range. After the overload, getAllKeys() and getAll() will no longer throw for dictionary input. When the IDBGetAllOptions dictionary initializes with its default values, it creates a query that retrieves all of the keys or values from the entire database.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
https://wpt.fyi/results/IndexedDB?label=master&label=experimental&aligned&q=getallrecords
Shipping on desktop | 141 |
DevTrial on desktop | 133 |
Shipping on Android | 141 |
Shipping on WebView | 141 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/8e5d76bd-4818-420c-a1eb-1bcd465bd1edn%40chromium.org.
LGTM2
LGTM3
/Daniel
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/96411e69-73f6-42bf-93ba-f8de39a9f27c%40chromium.org.