Opened 14 years ago

Last modified 10 years ago

#5873 closed enhancement

AndOrReadStore, AndOrWriteStore: New stores supporting complex queries — at Initial Version

Reported by: Frank Fortson Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.2
Component: Data Version: 1.0
Keywords: AndOrReadStore, AndOrWriteStore, complex query Cc: [email protected]
Blocked By: Blocking:

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.

Change History (5)

Changed 14 years ago by Frank Fortson

Attachment: AndOrReadStore.js added

AndOrReadStore?.js, complex query capability

Changed 14 years ago by Frank Fortson

Attachment: AndOrWriteStore.js added

AndOrWriteStore?.js, complex query capability

Changed 14 years ago by Frank Fortson

Attachment: tAndOrReadStore.js added

to be renamed to AndOrReadStore?.js and placed in dojox/data/tests/stores

Changed 14 years ago by Frank Fortson

Attachment: tAndOrWriteStore.js added

to be renamed to AndOrWriteStore?.js and placed in dojox/data/tests/stores

Changed 14 years ago by Frank Fortson

Attachment: module.js.patch added

patch to dojox/data/tests/module.js to add the two stores

Note: See TracTickets for help on using tickets.