Ticket #5873 (closed enhancement: fixed)
[patch][cla] AndOrReadStore, AndOrWriteStore: New stores supporting complex queries
| Reported by: | frankf | Owned by: | jaredj |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Data | Version: | 1.0 |
| Severity: | normal | Keywords: | AndOrReadStore,AndOrWriteStore,complex query |
| Cc: | frank.fortson@… |
Description
The attached AndOrReadStore?.js and AndOrWriteStore?.js are identical to ItemFileReadStore? and ItemFileWriteStore?, except the read store's _fetchItems, filter function supports complex queries against the store.
Example queries supported:
Programmatic:
query[:|=]"NOT id:23* AND (type:'test*' OR dept:'bob') && !filed:true"
Widget (where json object may be required for query):
query[:|=]{complexQuery:"NOT id:23* AND (type:'test*' OR dept:'bob') && !filed:true"}
Available logical operators (case insensitive):
, NOT AND OR ( ) ! && || Note: "," included for legacy queries (translated to AND).
Also, simple queries, as typically used with the other stores, are supported.
The stores are intended for dojox/data.
The attached AndOrXXXXStore.js unit test files are intended for dojox/data/tests/stores. The test file names are temporarily pre-fixed with "t" to prevent overwriting.
The attached patch file adds the two stores to the modules.js file in dojox/data/tests.