DS.RecordArrayManager Class addon/-private/system/record-array-manager.js:15
PRIVATE
Extends: Ember.Object
Defined in: addon/-private/system/record-array-manager.js:15
Module: ember-data
Methods
createAdapterPopulatedRecordArray
(typeClass, query)
DS.AdapterPopulatedRecordArray
Create a DS.AdapterPopulatedRecordArray
for a type with given query.
Parameters:
- typeClass DS.Model
- query Object
Returns:
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
Returns:
createRecordArray
(typeClass)
DS.RecordArray
Create a DS.RecordArray
for a type.
Parameters:
- typeClass Class
Returns:
liveRecordArrayFor
(typeClass)
DS.RecordArray
Get the DS.RecordArray
for a type, which contains all loaded records of
given type.
Parameters:
- typeClass Class
Returns:
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, 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, typeClass, record)
Update an individual filter.
Parameters:
- array DS.FilteredRecordArray
- filter Function
- typeClass DS.Model
- record 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.