The APIs
This section provides a summary of the data APIs. If you're just getting started, you may want to skim this section to get a feel for the capabilities the APIs and then come back after you've read the rest of the chapter, which has more concrete examples, to explore it further.
The Read API
All data stores will implement the dojo.data.api.Read API because this API
provides the means of retrieving, processing, and accessing the
data—clearly a prerequisite for any other operation. The complete
API specification follows in Table 9-1. The next section discusses
a toolkit-provided implementation: ItemFileReadStore.
Tip
The API listings that follow use descriptors like dojo.data.api.Item to convey the notion
of a dojo.data item even though
an item is somewhat of an abstract
concept.
Table 9-1. The dojo.data.api.Read API
Name | Comment |
|---|---|
| Given an item and an
attribute name, returns the value for the item. A value of
undefined is returned if the attribute does not exist
(whereas |
| Works just like
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access