[w3c/IndexedDB] Allow integers in key paths (including array ones) (#209)

Especially when sending large amounts of data over the wire, arrays are more appealing in consuming less bandwidth.

Although it is possible of course to transform arrays into objects and create indexes to reference object properties (I am doing this currently in [textbrowser](https://github.com/brettz9/textbrowser)), this adds its own performance penalty for both encoding and decoding, so I'd like to see the ability to index arrays (and objects containing arrays) by array index.

(While I am aware keys on arrays and objects are not actually numbers, clearly, numbers are typically how array items are referenced.)

I'd think this request ought to dovetail nicely with the goals of IndexedDB at enhancing client-side data storage and retrieval performance.

Assuming this concept could find agreement, I know the following issues would also need to be addressed, though I am personally less opinionated about them:

1. Whether to accept and round floats (and noting treatment of non-finite and negative numbers)
2. Whether to accept numeric strings (i.e., which violate the current keypath identifier requirements on string key path components but which might be treated like numbers/integers if they matched a numeric pattern) and whether this could include exponential notation
3. Whether to allow numbers to match object keys


-- 
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/209

Received on Thursday, 15 June 2017 23:40:45 UTC