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
(options);
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.
Defined by: dojo/store/DataStore
The object property to use to store the identity of the store items.
Defined by: dojo/store/DataStore
The object store to convert to a data store
Defined by: dojo/store/DataStore
add
(object,options)
Defined by dojo/store/DataStore
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. |
Returns: Number | undefined
get
(id,options)
Defined by dojo/store/DataStore
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 |
Returns: undefined
getChildren
(parent,options)
Defined by dojo/store/api/Store
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. |
Returns: dojo/store/api/Store.QueryResults
A result set of the children of the parent object.
getIdentity
(object)
Defined by dojo/store/DataStore
Fetch the identity for the given object.
Parameter | Type | Description |
---|---|---|
object | Object |
The data object to get the identity from. |
Returns: Number | undefined
The id of the given object.
getMetadata
(object)
Defined by dojo/store/api/Store
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. |
Returns: Object
An object containing metadata.
put
(object,options)
Defined by dojo/store/DataStore
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" }). |
Returns: undefined
query
(query,options)
Defined by dojo/store/DataStore
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. |
Returns: dojo/store/api/Store.QueryResults | undefined
A query results object that can be used to iterate over results.
queryEngine
(query,options)
Defined by dojo/store/DataStore
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. |
Returns: Function | function
A function that caches the passed query under the field "matches". See any of the "query" methods on dojo.stores.
remove
(id)
Defined by dojo/store/DataStore
Deletes an object by its identity.
Parameter | Type | Description |
---|---|---|
id | Object |
The identity to use to delete the object |
Returns: undefined
transaction
()
Defined by dojo/store/api/Store
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.
Returns: dojo/store/api/Store.Transaction
This represents the new current transaction.
© 2005–2017 JS Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/store/DataStore.html