Class DS.FixtureAdapter
DS.FixtureAdapter
is an adapter that loads records from memory.
It's primarily used for development and testing. You can also use
DS.FixtureAdapter
while working on the API but is 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. It's possible to develop your entire application
with DS.FixtureAdapter
.
For information on how to use the FixtureAdapter
in your
application please see the FixtureAdapter
guide.
coalesceFindRequests
Inherited from DS.Adapter packages/ember-data/lib/system/adapter.js:412
By default the store will try to coalesce all fetchRecord
calls within the same runloop
into as few requests as possible by calling groupRecordsForFindMany and passing it into a findMany call.
You can opt out of this behaviour by either not implementing the findMany hook or by setting
coalesceFindRequests to false.
defaultSerializer
Inherited from DS.Adapter packages/ember-data/lib/system/adapter.js:65
If you would like your adapter to use a custom serializer you can
set the defaultSerializer
property to be the name of the custom
serializer.
Note the defaultSerializer
serializer has a lower priority than
a model specific serializer (i.e. PostSerializer
) or the
application
serializer.
import DS from 'ember-data';
export default DS.Adapter.extend({
defaultSerializer: 'django'
});
latency
Defined in packages/ember-data/lib/adapters/fixture-adapter.js:49
By default the FixtureAdapter
will simulate a wait of the
latency
milliseconds before resolving promises with the fixture
values. This behavior can be turned off via the
simulateRemoteResponse
property.
simulateRemoteResponse
Defined in packages/ember-data/lib/adapters/fixture-adapter.js:37
If simulateRemoteResponse
is true
the FixtureAdapter
will
wait a number of milliseconds before resolving promises with the
fixture values. The wait time can be configured via the latency
property.