Re: [w3c/IndexedDB] Feature Request: Allow batch adding records (from an Array) (#69)

TPAC 2019 Web Apps breakout:

* Use case makes sense
* For the key+value case, various options:
 * mumble([v1, v2, ...], [k1, k2, ...]) - terrible ergonomics, rejected
 * mumble({k1:v1, k2:v2, ...}) - this doesn't work because IDB has non-string key types
 * mumble(new Map( .... )) - plausible, maybe the favorite?
 * mumble([[k1, v1], [k2, v2], ...]) - plausible; this is what Map ctor takes
 * mumble([{key:k1, value:v1},{key:k2,value:v2}, ...]) - too wordy?
* Need to solve put(value) vs. put(value, key) case for multiples; suggestion was to use multiple methods, e.g. putAll() and putAllValues(), such as:
   * putAllValues(iterable<any>)
   * putAll(map) or putAllEntries(map)

Follow-up: concrete proposal, solicit developer feedback


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/69#issuecomment-533355486

Received on Friday, 20 September 2019 00:21:23 UTC