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


PRIVATE

Show:

createAdapterPopulatedRecordArray

(modelName, query) DS.AdapterPopulatedRecordArray

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

Parameters:

modelName String
query Object

createFilteredRecordArray

(modelName, filter, query) DS.FilteredRecordArray

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

Parameters:

modelName String
filter Function
query Object
(optional

createRecordArray

(modelName) DS.RecordArray

Create a DS.RecordArray for a modelName.

Parameters:

modelName String

Returns:

DS.RecordArray

liveRecordArrayFor

(modelName) DS.RecordArray

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

Parameters:

modelName String

Returns:

DS.RecordArray

registerFilteredRecordArray

(array, modelName, filter)

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

Parameters:

array DS.RecordArray
modelName String
filter Function

unregisterRecordArray

(array)

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

Parameters:

array DS.RecordArray

updateFilter

(array, modelName, 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
modelName String
filter Function

updateFilterRecordArray

(array, filter, modelName, internalModel)

Update an individual filter.

Parameters:

array DS.FilteredRecordArray
filter Function
modelName String
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.