Function
Creates a memory object store.
This provides any configuration information that will be mixed into the store. This should generally include the data property to provide the starting set of data.
Array
The array of all the objects in the memory store
String
Indicates the property to use as the identity property. The values of this property should be unique.
Object
An index of data by id
Function
Defines the query engine to use for querying the data store
Function
The identity to use to lookup the object
Retrieves an object by its identity
Object The object in the store that matches the given id.
Function
The object to get the identity from
Returns an object's identity
Number
Function
The object to store.
Additional metadata for storing the data. Includes an "id" property if a specific id is to be used.
Stores an object
Number
Function
The object to store.
Additional metadata for storing the data. Includes an "id" property if a specific id is to be used.
Creates an object, throws an error if the object already exists
Number
Function
The identity to use to delete the object
Deletes an object by its identity
Function
The query to use for retrieving objects from the store.
The optional arguments to apply to the resultset.
Queries the store for objects.
dojo.store.api.Store.QueryResults The results of the query, extended with iterative methods.
Given the following store: var store = new dojo.store.Memory({ data: [ {id: 1, name: "one", prime: false }, {id: 2, name: "two", even: true, prime: true}, {id: 3, name: "three", prime: true}, {id: 4, name: "four", even: true, prime: false}, {id: 5, name: "five", prime: true} ] }); ...find all items where "prime" is true: var results = store.query({ prime: true }); ...or find all items where "even" is true: var results = store.query({ even: true });
Function
An array of objects to use as the source of data.
Sets the given data as the source for this store, and indexes it
Object[
An array of objects to use as the source of data.
Object
Object