Created
October 1, 2013 18:40
-
-
Save kagemusha/6783059 to your computer and use it in GitHub Desktop.
Ember Data Store Synchronous Methods - not a complete list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
store.getById | |
sync return rec from store if avail or return null | |
e.g. | |
var post = store.getById('post', 1); | |
filter: function(type, query, filter) | |
@param {Class} type | |
@param {Function} filter | |
@return {DS.FilteredRecordArray} | |
Takes a type and filter function, and returns a live RecordArray that | |
remains up to date as new records are loaded into the store or created | |
locally. | |
The callback function takes a materialized record, and returns true | |
if the record should be included in the filter and false if it should | |
not. | |
If any of a record's properties change, or if it changes state, the | |
filter function will be invoked again to determine whether it should | |
still be in the array. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment