Module: delite/ArrayToStoreAdapter

delite/ArrayToStoreAdapter

require(["delite/ArrayToStoreAdapter"], function (ArrayToStoreAdapter) {
  new ArrayToStoreAdapter();
});

An adapter to use an array in the source of delite/Store.js. Created to keep a commun interface with the use of dstore/Store instead of an array.

The arguments to pass to the constructor are:

  • source: Array - the array represented by the adapter.
  • query: the query filter to apply to the source.
  • processQueryResult: function to apply to the source
Source:
Show inherited

Members

<readonly> track :boolean

Indicates if the source is observable.

Type:
  • boolean
Default Value:
  • false
Source:

Methods

deliver()

Synchronously emit add/update/delete events for all recent changes.

Source:

discardChanges()

Discard recent change records.

Source:

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:

getIdentity(item) → {*}

Returns the identity of an item.

Parameters:
Name Type Description
item Object

The item.

Source:
Returns:
Type
*

setIdentity()

Set the identity of an object.

Source:

untrack()

Stop observing the array and its items.

Source: