DS.Store#peekAll()

peekAll (modelName) DS.RecordArray Defined in addon/-private/system/store.js:1473 Available since 1.13.0 This method returns a filtered array that contains all of the known records for a given type in the store. Note that because it's just a filter, the result will contain any locally created records of the type, however, it will not make a request to the backend to retrieve additional records. If you would like to request all the records from the backend please use store.findAll. Also note

DS.Store#normalize()

normalize (modelName, payload) Object Defined in addon/-private/system/store.js:2271 normalize converts a json payload into the normalized form that push expects. Example socket.on('message', function(message) { var modelName = message.model; var data = message.data; store.push(store.normalize(modelName, data)); }); Parameters: modelName String The name of the model type for this payload payload Object Returns: Object The normalized payload

DS.Store#modelFor()

modelFor (modelName) DS.Model Defined in addon/-private/system/store.js:1921 Returns the model class for the particular modelName. The class of a model might be useful if you want to get a list of all the relationship names of the model, see relationshipNames for example. Parameters: modelName String Returns: DS.Model

DS.Store#init()

initprivate Defined in addon/-private/system/store.js:215

DS.Store#hasRecordForId()

hasRecordForId (modelName, inputId) Boolean Defined in addon/-private/system/store.js:966 Returns true if a record for a given type and ID is already loaded. Parameters: modelName (String|DS.Model) inputId (String|Integer) Returns: Boolean

DS.Store#getReference()

getReference (type, id) RecordReference Defined in addon/-private/system/store.js:869 Available since 2.5.0 Get the reference for the specified record. Example var userRef = store.getReference('user', 1); // check if the user is loaded var isLoaded = userRef.value() !== null; // get the record of the reference (null if not yet available) var user = userRef.value(); // get the identifier of the reference if (userRef.remoteType() === "id") { var id = userRef.id(); } // load user (via stor

DS.Store#flushPendingSave()

flushPendingSaveprivate Defined in addon/-private/system/store.js:1708 This method is called at the end of the run loop, and flushes any records passed into scheduleSave

DS.Store#findRecord()

findRecord (modelName, id, options) Promise Defined in addon/-private/system/store.js:461 Available since 1.13.0 This method returns a record for a given type and id combination. The findRecord method will always resolve its promise with the same object for a given type and id. The findRecord method will always return a promise that will be resolved with the record. Example app/routes/post.js import Ember from 'ember'; export default Ember.Route.extend({ model: function(params) { ret

DS.Store#findMany()

findMany (internalModels) Promiseprivate Defined in addon/-private/system/store.js:1015 Parameters: internalModels Array Returns: Promise promise

DS.Store#findHasMany()

findHasMany (owner, link, relationship) Promiseprivate Defined in addon/-private/system/store.js:1032 If a relationship was originally populated by the adapter as a link (as opposed to a list of IDs), this method is called when the relationship is fetched. The link (which is usually a URL) is passed through unchanged, so the adapter can make whatever request it wants. The usual use-case is for the server to register a URL as a link, and then use that URL in the future to make a request for