W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

[Bug 28456] New: nested keyPath: allow specification which part should be iterated if it's an array

From: <bugzilla@jessica.w3.org>
Date: Thu, 09 Apr 2015 22:00:24 +0000
To: public-webapps@w3.org
Message-ID: <bug-28456-2927@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28456

            Bug ID: 28456
           Summary: nested keyPath: allow specification which part should
                    be iterated if it's an array
           Product: WebAppsWG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
          Assignee: dave.null@w3.org
          Reporter: timm@preetz.us
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org

In one of our apps I would like to store objects like this:
{ children: [{ id: 'c1' }, { id: 'c1' }] }

I would like to be able to create an index to quickly find all parents for
child 'c1'.

Sadly an index like "children.id" { multiEntry: true } does not work here.

I would propose something like "children[].id" { multiEntry: true } to
indicate, that the children property should be iterated, not their id field.

Related discussions:
https://social.msdn.microsoft.com/Forums/en-US/dbf2fd2d-a8ca-4228-8a49-3948d44f7e26/indexeddb-and-complex-keypaths-for-index
(where Israel Hilerio (MSFT) mentions this should be discussed for IDB v2)
https://github.com/dfahlander/Dexie.js/issues/86

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 9 April 2015 22:00:26 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC