DS.RecordArrayManager Class addon/-private/system/record-array-manager.js:61


PRIVATE

Extends: Ember.Object

Defined in: addon/-private/system/record-array-manager.js:61

Module: ember-data

Show:

createAdapterPopulatedRecordArray

(typeClass, query) DS.AdapterPopulatedRecordArray

Create a DS.AdapterPopulatedRecordArray for a type with given query.

Parameters:

typeClass DS.Model
query Object

createFilteredRecordArray

(typeClass, filter, query) DS.FilteredRecordArray

Create a DS.FilteredRecordArray for a type and register it for updates.

Parameters:

typeClass DS.Model
filter Function
query Object
(optional

createRecordArray

(modelClass) DS.RecordArray

Create a DS.RecordArray for a type.

Parameters:

modelClass Class

Returns:

DS.RecordArray

liveRecordArrayFor

(typeClass) DS.RecordArray

Get the DS.RecordArray for a type, which contains all loaded records of given type.

Parameters:

typeClass Class

Returns:

DS.RecordArray

registerFilteredRecordArray

(array, typeClass, filter)

Register a RecordArray for a given type to be backed by a filter function. This will cause the array to update automatically when records of that type change attribute values or states.

Parameters:

array DS.RecordArray
typeClass DS.Model
filter Function

unregisterRecordArray

(array)

Unregister a RecordArray. So manager will not update this array.

Parameters:

array DS.RecordArray

updateFilter

(array, modelClass, filter)

This method is invoked if the filterFunction property is changed on a DS.FilteredRecordArray.

It essentially re-runs the filter from scratch. This same method is invoked when the filter is created in th first place.

Parameters:

array Array
modelClass Class
filter Function

updateFilterRecordArray

(array, filter, modelClass, internalModel)

Update an individual filter.

Parameters:

array DS.FilteredRecordArray
filter Function
modelClass DS.Model
internalModel InternalModel

updateRecordArrays

This method is invoked whenever data is loaded into the store by the adapter or updated by the adapter, or when a record has changed.

It updates all record arrays that a record belongs to.

To avoid thrashing, it only runs at most once per run loop.