Login Register Help
API Documentation
Choose a stylesheet:

Constructordojox.data.QueryReadStore

dojo.require("dojox.data.QueryReadStore");
defined in dojox/data/QueryReadStore.js
By default all the sorting is done serverside before the data is returned which is the proper place to be doing it for really large datasets.

Examples

Example 1

// The parameter "query" contains the data that are sent to the server.
var store = new dojox.data.QueryReadStore({url:'/search.php'});
store.fetch({query:{name:'a'}, queryOptions:{ignoreCase:false}});
 
 
// Since "serverQuery" is given, it overrules and those data are
// sent to the server.
var store = new dojox.data.QueryReadStore({url:'/search.php'});
store.fetch({serverQuery:{name:'a'}, queryOptions:{ignoreCase:false}});
 
 
<div dojoType="dojox.data.QueryReadStore"
    jsId="store2"
    url="../tests/stores/QueryReadStore.php"
    requestMethod="post"></div>
<div dojoType="dojox.grid.data.DojoData"
    jsId="model2"
    store="store2"
    sortFields="[{attribute: 'name', descending: true}]"
    rowsPerPage="30"></div>
<div dojoType="dojox.Grid" id="grid2"
    model="model2"
    structure="gridLayout"
    style="height:300px; width:800px;"></div>

Jump to PropertiesJump to FunctionsConstructorsBack to top

The request contains the data as defined in the Read-API. Additionally there is following keyword "serverQuery". The *serverQuery* parameter, optional. This parameter contains the data that will be sent to the server. If this parameter is not given the parameter "query"'s data are sent to the server. This is done for some reasons: - to specify explicitly which data are sent to the server, they might also be a mix of what is contained in "query", "queryOptions" and the paging parameters "start" and "count" or may be even completely different things. - don't modify the request.query data, so the interface using this store can rely on unmodified data, as the combobox dijit currently does it, it compares if the query has changed - request.query is required by the Read-API I.e. the following examples might be sent via GET: fetch({query:{name:"abc"}, queryOptions:{ignoreCase:true}}) the URL will become: /url.php?name=abc fetch({serverQuery:{q:"abc", c:true}, query:{name:"abc"}, queryOptions:{ignoreCase:true}}) the URL will become: /url.php?q=abc&c=true // The serverQuery-parameter has overruled the query-parameter // but the query parameter stays untouched, but is not sent to the server! // The serverQuery contains more data than the query, so they might differ!

Jump to PropertiesJump to ConstructorsFunctionsBack to top

Overrides
Overrides
FunctioncontainsValue(item: item, attribute: attribute-name-string, value: anything)
Overrides
Functionfetch(request: Object?): Object
Overrides
See dojo.data.util.simpleFetch.fetch() this is just a copy and I adjusted only the paging, since it happens on the server if doClientPaging is false, thx to http://trac.dojotoolkit.org/ticket/4761 reporting this. Would be nice to be able to use simpleFetch() to reduce copied code, but i dont know how yet. Ideas please!
Overrides
See dojo.data.api.Identity.fetchItemByIdentity()
FunctiongetAttributes(item: item)
Overrides
Overrides
FunctiongetIdentity(item: item)
Overrides
See dojo.data.api.Identity.getIdentity()
Overrides
See dojo.data.api.Identity.getIdentityAttributes()
FunctiongetLabel(item: item): String | undefined
Overrides
See dojo.data.api.Read.getLabel()
FunctiongetLabelAttributes(item: item): Array | null
Overrides
See dojo.data.api.Read.getLabelAttributes()
FunctiongetValue(item: item, attribute: attribute-name-string, defaultValue: value?)
Overrides
FunctiongetValues(item: item, attribute: attribute-name-string)
Overrides
FunctionhasAttribute(item: item, attribute: attribute-name-string)
Overrides
See dojo.data.api.Read.hasAttribute()
FunctionisItem(something: anything)
Overrides
FunctionisItemLoaded(something: anything)
Overrides
Overrides
Function_assertIsAttribute(attribute: attribute-name-string)
Overrides
This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
Function_assertIsItem(item: item)
Overrides
It throws an error if item is not valid, so you can call it in every method that needs to throw an error when item is invalid.
Function_filterResponse(data: The)
Overrides
If the data from servers needs to be processed before it can be processed by this store, then this function should be re-implemented in subclass. This default implementation just return the data unchanged.

Jump to FunctionsJump to ConstructorsPropertiesBack to top

Overrides
Overrides
Overrides
Overrides
Overrides
Overrides
Overrides
Overrides
Overrides
Overrides
Overrides
Overrides
Overrides