I have a items in a data store that have a position object. For an array of items in the store, here's a sampling of the position attributes that the items might have:
position : 1
position : 1.1
position : 1.15
position : 1.15.1
position : 1.2.7
position : 2
position : 2.1
While it's easy enough to issue a query to the store for all position 1 items, such as query:{position:'1'}
- returns example 1 above
and it's pretty easy to issue a query for all level 1 items, such as query:{position:'?'}
- returns example 1 and 6 above
and you can get all children entries for position 1 by query:{position:'1.*'}
- returns the first 4 examples above
what you can't do with the current query support is get the immediate children of position 1's children, but not grandchildren (i.e. 1.1 and 1.15 from above)
Something like this (if supported) would do it: query:{position:'1.[0-9]*'}
- which if I'm thinking correctly would be a regexp way of saying, "I want anything starting with 1. and followed by numbers only. That allows the 1.1 and 1.15 and 1.15004 to be returned, but not 1.15.1
That's what I'm trying to accomplish...ultimately for subgrid support in dojox.grid.DataGrid, but the issue is a data store query reg expression support issue.
What's the best way to handle this requirement today (Dojo 1.2)?
