home
  • Blog
  • Home
  • Projects
    • Ember
    • EmberData
    • Ember CLI
1.13
  • Packages
    • ember
    • ember-application
    • ember-debug
    • ember-extension-support
    • ember-htmlbars
    • ember-metal
    • ember-routing
    • ember-routing-htmlbars
    • ember-routing-views
    • ember-runtime
    • ember-templates
    • ember-testing
    • ember-views
  • Namespaces
    • Ember
    • Ember.FEATURES
    • Ember.String
    • Ember.computed
    • Ember.inject
    • Ember.run
  • Classes
    • Ember.Application
    • Ember.Array
    • Ember.ArrayProxy
    • Ember.Binding
    • Ember.Checkbox
    • Ember.Component
    • Ember.ComputedProperty
    • Ember.ContainerDebugAdapter
    • Ember.Controller
    • Ember.ControllerMixin
    • Ember.CoreObject
    • Ember.DataAdapter
    • Ember.DefaultResolver
    • Ember.Error
    • Ember.Evented
    • Ember.Helper
    • Ember.InstrumentationSupport
    • Ember.Logger
    • Ember.Mixin
    • Ember.MutableArray
    • Ember.MutableEnumerable
    • Ember.Namespace
    • Ember.NativeArray
    • Ember.Object
    • Ember.Observable
    • Ember.PromiseProxyMixin
    • Ember.Route
    • Ember.Router
    • Ember.Service
    • Ember.Test
    • Ember.Test.Adapter
    • Ember.Test.QUnitAdapter
    • Ember.TextArea
    • Ember.TextField
    • Ember.VisibilitySupport
    • RSVP.EventTarget
    • RSVP.Promise

Class Ember.DataAdapter public


Extends: EmberObject
Defined in: packages/ember-extension-support/lib/data_adapter.js:14
Module: ember

The DataAdapter helps a data persistence library interface with tools that debug Ember such as the Ember Extension for Chrome and Firefox.

This class will be extended by a persistence library which will override some of the methods with library-specific code.

The methods likely to be overridden are:

  • getFilters
  • detect
  • columnsForType
  • getRecords
  • getRecordColumnValues
  • getRecordKeywords
  • getRecordFilterValues
  • getRecordColor
  • observeRecord

The adapter will need to be registered in the application's container as dataAdapter:main

Example:

Application.initializer({
  name: "data-adapter",

  initialize: function(container, application) {
    application.register('data-adapter:main', DS.DataAdapter);
  }
});


Methods

getFilters : Array public

Module: ember

Defined in packages/ember-extension-support/lib/data_adapter.js:122

returns
Array

List of objects defining filters. The object should have a name and desc property.

Specifies how records can be filtered. Records returned will need to have a filterValues property with a key for every name in the returned array.

watchModelTypes (typesAdded, typesUpdated) : Function public

Module: ember

Defined in packages/ember-extension-support/lib/data_adapter.js:136

typesAdded
Function

Callback to call to add types. Takes an array of objects containing wrapped types (returned from wrapModelType).

typesUpdated
Function

Callback to call when a type has changed. Takes an array of objects containing wrapped types.

returns
Function

Method to call to remove all observers

Fetch the model types and observe them for changes.

watchRecords (modelName, recordsAdded, recordsUpdated, recordsRemoved) : Function public

Module: ember

Defined in packages/ember-extension-support/lib/data_adapter.js:179

modelName
String

The model name

recordsAdded
Function

Callback to call to add records. Takes an array of objects containing wrapped records. The object should have the following properties: columnValues: {Object} key and value of a table cell object: {Object} the actual record object

recordsUpdated
Function

Callback to call when a record has changed. Takes an array of objects containing wrapped records.

recordsRemoved
Function

Callback to call when a record has removed. Takes the following parameters: index: the array index where the records were removed count: the number of records removed

returns
Function

Method to call to remove all observers

Fetch the records of a given type and observe them for changes.

Properties

acceptsModelName public

Module: ember

Defined in packages/ember-extension-support/lib/data_adapter.js:98

Ember Data > v1.0.0-beta.18 requires string model names to be passed around instead of the actual factories.

This is a stamp for the Ember Inspector to differentiate between the versions to be able to support older versions too.

container public

Module: ember

Defined in packages/ember-extension-support/lib/data_adapter.js:62

Available since v1.3.0

The container of the application being debugged. This property will be injected on creation.

containerDebugAdapter public

Module: ember

Defined in packages/ember-extension-support/lib/data_adapter.js:75

Available since v1.5.0

The container-debug-adapter which is used to list all models.

On this page


Methods

  • getFilters
  • watchModelTypes
  • watchRecords

Properties

  • acceptsModelName
  • container
  • containerDebugAdapter
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2025 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue Created with Sketch.