Opened 11 years ago

Closed 11 years ago

#8237 closed enhancement (wontfix)

dojo.data.ItemFileReadStore: Hook for replacing dojo.data.util.filter.patternToRegExp()

Reported by: holgerthurow Owned by: Jared Jurkiewicz
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.2.0
Keywords: dojo.data.ItemFileReadStore.fetch, patternToRegExp() Cc:
Blocked By: Blocking:

Description

There should be a hook for a own patternToRegExp() function instead of dojo.data.util.filter.patternToRegExp() in

regexpList[key] = dojo.data.util.filter.patternToRegExp(value, ignoreCase);

in dojo.data.ItemFileReadStore?. So we could use regular expressions in defining a query, i. e.

store.fetch({
    query : {name : "^(Spanish|French)$"},
    queryOptions : {ignoreCase: 1},
    onItem : function(item, request){ ... }
})

I have successfully tested such regular expressions in queries by overwriting dojo.data.util.filter.patternToRegExp() for testing purposes.

Change History (1)

comment:1 Changed 11 years ago by Jared Jurkiewicz

Resolution: wontfix
Status: newclosed

ItemFileReadStore? has a defined query syntax for it, which is spelled out in the documentation. If you want to over-ride/alter this behavior, then you should extend the store and modify the functions in question. I'm not going to add in a hook to alter how the query info is handled given the extensive documentation on what ItemFile?*Store uses for query, sorry.

Marking as closed, wontfix.

Note: See TracTickets for help on using tickets.