This is an adapter for using Dojo Data stores with an object store consumer. You can provide a Dojo data store and use this adapter to interact with it through the Dojo object store API
Parameter | Type | Description |
---|---|---|
options | Object |
Optional This provides any configuration information that will be mixed into the store, including a reference to the Dojo data store under the property "store". |
See the dojo/store/DataStore reference documentation for more information.
The object property to use to store the identity of the store items.
Creates an object, throws an error if the object already exists
Parameter | Type | Description |
---|---|---|
object | Object | The object to store. |
options | dojo/store/api/Store.PutDirectives |
Optional Additional metadata for storing the data. Includes an "id" property if a specific id is to be used. |
Retrieves an object by it's identity. This will trigger a fetchItemByIdentity
Parameter | Type | Description |
---|---|---|
id | Object |
Optional The identity to use to lookup the object |
options | undefined |
Retrieves the children of an object.
Parameter | Type | Description |
---|---|---|
parent | Object | The object to find the children of. |
options | dojo/store/api/Store.QueryOptions |
Optional Additional options to apply to the retrieval of the children. |
A result set of the children of the parent object.
Fetch the identity for the given object.
Parameter | Type | Description |
---|---|---|
object | Object | The data object to get the identity from. |
The id of the given object.
Returns any metadata about the object. This may include attribution, cache directives, history, or version information.
Parameter | Type | Description |
---|---|---|
object | Object | The object to return metadata for. |
An object containing metadata.
Stores an object by its identity.
Parameter | Type | Description |
---|---|---|
object | Object | The object to store. |
options | Object |
Optional Additional metadata for storing the data. Includes a reference to an id that the object may be stored with (i.e. { id: "foo" }). |
Queries the store for objects.
Parameter | Type | Description |
---|---|---|
query | Object | The query to use for retrieving objects from the store |
options | Object |
Optional Optional options object as used by the underlying dojo.data Store. |
A query results object that can be used to iterate over results.
Defines the query engine to use for querying the data store
Parameter | Type | Description |
---|---|---|
query | Object | An object hash with fields that may match fields of items in the store. Values in the hash will be compared by normal == operator, but regular expressions or any object that provides a test() method are also supported and can be used to match strings by more complex expressions (and then the regex's or object's test() method will be used to match values). |
options | dojo/store/api/Store.QueryOptions |
Optional An object that contains optional information such as sort, start, and count. |
A function that caches the passed query under the field "matches". See any of the "query" methods on dojo.stores.
Deletes an object by its identity.
Parameter | Type | Description |
---|---|---|
id | Object | The identity to use to delete the object |
Starts a new transaction. Note that a store user might not call transaction() prior to using put, delete, etc. in which case these operations effectively could be thought of as "auto-commit" style actions.
This represents the new current transaction.