[Pkg-javascript-commits] [dojo] 03/09: API clarification fixes #6564

David Prévot taffit at moszumanska.debian.org
Mon May 11 20:11:55 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.1.1
in repository dojo.

commit d9f41d4efb9760a925918c862161cc0d4d82e536
Author: Jared Jurkiewicz <jaredj at dojotoolkit.org>
Date:   Fri Apr 18 20:10:17 2008 +0000

    API clarification fixes #6564
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.1/dojo@13351 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 data/api/Read.js | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/data/api/Read.js b/data/api/Read.js
index 83a1c29..0bf2635 100644
--- a/data/api/Read.js
+++ b/data/api/Read.js
@@ -224,7 +224,7 @@ dojo.declare("dojo.data.api.Read", null, {
 		//		conforming to dojo.data.api.Request or may be a simple anonymous object
 		//		that may contain any of the following:
 		//		{ 
-		//			query: query-string or query-object,
+		//			query: query-object or query-string,
 		//			queryOptions: object,
 		//			onBegin: Function,
 		//			onItem: Function,
@@ -246,13 +246,20 @@ dojo.declare("dojo.data.api.Read", null, {
 		//		The dojo.data.api.Read API does not specify the syntax or semantics
 		//		of the query itself -- each different data store implementation
 		//		may have its own notion of what a query should look like.
-		//		In most implementations the query will probably be a string, but
-		//		in some implementations the query might be a Date, or a number,
-		//		or some complex keyword parameter object.  The dojo.data.api.Read
-		//		API is completely agnostic about what the query actually is.  
-		//		In general for query objects that accept strings as attribute value matches, 
-		//		the store should support basic filtering capability, such as * (match any character)
-		//		and ? (match single character). 
+		//		However, as of dojo 0.9, 1.0, and 1.1, all the provided datastores in dojo.data
+		//		and dojox.data support an object structure query, where the object is a set of 
+		//		name/value parameters such as { attrFoo: valueBar, attrFoo1: valueBar1}.  Most of the
+		//		dijit widgets, such as ComboBox assume this to be the case when working with a datastore 
+		//		when they dynamically update the query.  Therefore, for maximum compatibility with dijit 
+		//		widgets the recommended query parameter is a key/value object.  That does not mean that the
+		//		the datastore may not take alternative query forms, such as a simple string, a Date, a number, 
+		//		or a mix of such.  Ultimately, The dojo.data.api.Read API is agnostic about what the query 
+		//		format.  
+		//		Further note:  In general for query objects that accept strings as attribute 
+		//		value matches, the store should also support basic filtering capability, such as * 
+		//		(match any character) and ? (match single character).  An example query that is a query object
+		//		would be like: { attrFoo: "value*"}.  Which generally means match all items where they have 
+		//		an attribute named attrFoo, with a value that starts with 'value'.
 		//
 		//	The *queryOptions* parameter
 		//		The queryOptions parameter is an optional parameter used to specify optiosn that may modify

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list