require(["delite/DstoreToStoreAdapter"], function (DstoreToStoreAdapter) {
new DstoreToStoreAdapter();
});
An adapter to use dstore/Store in the source of delite/Store.js. Created to keep a commun interface with the use of an array instead of dstore/Store. The arguments to pass to the constructor are:
- source: dstore/Store - the dstore/Store represented by the adapter.
- query: the query filter to apply to the store.
- processQueryResult: function to apply to the store.
- Source:
Members
-
<readonly> track :boolean
-
Indicates if the source is trackable.
Type:
- boolean
- Default Value:
- false
- Source:
Methods
-
fetch()
-
Perform the fetch operation on the collection.
- Source:
-
fetchRange(args)
-
Perform the fetchRange operation on the collection.
Parameters:
Name Type Description args
Object contains the start index and the end index of the fetch.
- Source:
-
get()
-
Retrieve an object in the data by its identity.
- Source:
-
<protected> getIdentity(item) → {*}
-
Return the identity of an item.
Parameters:
Name Type Description item
Object The item.
- Source:
Returns:
- Type
- *
-
on(type, listener) → {Object}
-
Bind the listener of the adapter with the events send by the dstore/Trackable.
Parameters:
Name Type Description type
listener
- Source:
Returns:
Handle with
remove()
method to cancel the listener.- Type
- Object
-
setIdentity()
-
Set the identity of an object.
- Source:
-
untrack()
-
Remove the trackability of the dstore.
- Source: