Sha256: 48ba375c2c0031bc04f2dafc16c4ebb9de4deb0d5d70607b28117c21cea68206

Contents?: true

Size: 1.63 KB

Versions: 12

Compression:

Stored size: 1.63 KB

Contents

<%= copyright_block(namespace_class_name) %>
/*globals <%= namespace %> */

/** @class

  (Document Your Data Source Here)

  @extends <%= base_class_name || 'SC.DataSource' %>
*/
<%= namespace_class_name %> = <%= base_class_name || 'SC.DataSource' %>.extend(
/** @scope <%= namespace_class_name %>.prototype */ {

  // ..........................................................
  // QUERY SUPPORT
  //

  fetch: function(store, query) {

    // TODO: Add handlers to fetch data for specific queries.
    // call store.dataSourceDidFetchQuery(query) when done.

    return NO; // return YES if you handled the query
  },

  // ..........................................................
  // RECORD SUPPORT
  //

  retrieveRecord: function(store, storeKey) {

    // TODO: Add handlers to retrieve an individual record's contents
    // call store.dataSourceDidComplete(storeKey) when done.

    return NO; // return YES if you handled the storeKey
  },

  createRecord: function(store, storeKey) {

    // TODO: Add handlers to submit new records to the data source.
    // call store.dataSourceDidComplete(storeKey) when done.

    return NO; // return YES if you handled the storeKey
  },

  updateRecord: function(store, storeKey) {

    // TODO: Add handlers to submit modified record to the data source
    // call store.dataSourceDidComplete(storeKey) when done.

    return NO; // return YES if you handled the storeKey
  },

  destroyRecord: function(store, storeKey) {

    // TODO: Add handlers to destroy records on the data source.
    // call store.dataSourceDidDestroy(storeKey) when done

    return NO; // return YES if you handled the storeKey
  }

});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.11.0.rc3 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.11.0.rc2 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.11.0.rc1 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.10.3.1 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.10.2 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.10.1 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.10.0 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.10.0.rc.3 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.10.0.rc.2 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.10.0.rc.1 lib/gen/data-source/templates/data_sources/@filename@_data_source.js
sproutcore-1.9.2 lib/gen/data-source/templates/data_sources/@filename@_data_source.js