DS.FixtureAdapter Class packages/ember-data/lib/adapters/fixture_adapter.js:13


DS.FixtureAdapter is an adapter that loads records from memory. Its primarily used for development and testing. You can also use DS.FixtureAdapter while working on the API but are not ready to integrate yet. It is a fully functioning adapter. All CRUD methods are implemented. You can also implement query logic that a remote system would do. Its possible to do develop your entire application with DS.FixtureAdapter.

Show:

createRecord

(store, type, record)

Parameters:

store
type
record

deleteRecord

(store, type, record)

Parameters:

store
type
record

find

(store, type, id)

Parameters:

store
type
id

findAll

(store, type) private

Parameters:

store
type

findMany

(store, type, ids)

Parameters:

store
type
ids

findQuery

(store, type, query, array) private

Parameters:

store
type
query
array

fixturesForType

(type)

Implement this method in order to provide data associated with a type

Parameters:

type

generateIdForRecord

(store, record)

Parameters:

store
record

mockJSON

(type, record)

Implement this method in order to provide json for CRUD methods

Parameters:

type
record

queryFixtures

(fixture, query, type)

Implement this method in order to query fixtures data

Parameters:

fixture
query
type

serialize

(record, options)

Proxies to the serializer's serialize method.

Parameters:

record DS.Model
options Object

updateFixtures

(type, fixture)

Parameters:

type
fixture

updateRecord

(store, type, record)

Parameters:

store
type
record