dojo.data.api.Read.close
dojo.require("dojo.data.api.Read");
defined in dojo/data/api/Read.js
The close() method is intended for instructing the store to 'close' out any information associated with a particular request. In general, this API expects to recieve as a parameter a request object returned from a fetch. It will then close out anything associated with that request, such as clearing any internal datastore caches and closing any 'open' connections. For some store implementations, this call may be a no-op.
Usage
function (/*dojo.data.api.Request*/ request) (view source)
parameter | type | description | ||||||
---|---|---|---|---|---|---|---|---|
request | dojo.data.api.Request | An instance of a request for the store to use to identify what to close out. If no request is passed, then the store should clear all internal caches (if any) and close out all 'open' connections. It does not render the store unusable from there on, it merely cleans out any current data and resets the store to initial state. This class defines out the semantics of what a 'Request' object looks like when returned from a fetch() method. In general, a request object is nothing more than the original keywordArgs from fetch with an abort function attached to it to allow users to abort a particular request if they so choose. No other functions are required on a general Request object return. That does not inhibit other store implementations from adding extentions to it, of course. This is an abstract API that data provider implementations conform to. This file defines methods signatures and intentionally leaves all the methods unimplemented. For more details on fetch, see dojo.data.api.Read.fetch().
|
Examples
Example 1
var request = store.fetch({onComplete: doSomething});
...
store.close(request);