Ticket #6564: dojo.data_docUpdate.patch

File dojo.data_docUpdate.patch, 2.5 kB (added by jaredj, 9 months ago)
  • data/api/Read.js

     
    224224                //              conforming to dojo.data.api.Request or may be a simple anonymous object 
    225225                //              that may contain any of the following: 
    226226                //              {  
    227                 //                      query: query-string or query-object, 
     227                //                      query: query-object or query-string, 
    228228                //                      queryOptions: object, 
    229229                //                      onBegin: Function, 
    230230                //                      onItem: Function, 
     
    246246                //              The dojo.data.api.Read API does not specify the syntax or semantics 
    247247                //              of the query itself -- each different data store implementation 
    248248                //              may have its own notion of what a query should look like. 
    249                 //              In most implementations the query will probably be a string, but 
    250                 //              in some implementations the query might be a Date, or a number, 
    251                 //              or some complex keyword parameter object.  The dojo.data.api.Read 
    252                 //              API is completely agnostic about what the query actually is.   
    253                 //              In general for query objects that accept strings as attribute value matches,  
    254                 //              the store should support basic filtering capability, such as * (match any character) 
    255                 //              and ? (match single character).  
     249                //              However, as of dojo 0.9, 1.0, and 1.1, all the provided datastores in dojo.data 
     250                //              and dojox.data support an object structure query, where the object is a set of  
     251                //              name/value parameters such as { attrFoo: valueBar, attrFoo1: valueBar1}.  Most of the 
     252                //              dijit widgets, such as ComboBox assume this to be the case when working with a datastore  
     253                //              when they dynamically update the query.  Therefore, for maximum compatibility with dijit  
     254                //              widgets the recommended query parameter is a key/value object.  That does not mean that the 
     255                //              the datastore may not take alternative query forms, such as a simple string, a Date, a number,  
     256                //              or a mix of such.  Ultimately, The dojo.data.api.Read API is agnostic about what the query  
     257                //              format.   
     258                //              Further note:  In general for query objects that accept strings as attribute  
     259                //              value matches, the store should also support basic filtering capability, such as *  
     260                //              (match any character) and ? (match single character).  An example query that is a query object 
     261                //              would be like: { attrFoo: "value*"}.  Which generally means match all items where they have  
     262                //              an attribute named attrFoo, with a value that starts with 'value'. 
    256263                // 
    257264                //      The *queryOptions* parameter 
    258265                //              The queryOptions parameter is an optional parameter used to specify optiosn that may modify