Open Glavin001 opened 10 years ago
keyForAttribute
keyForRelationship
The following should simply forward to the SLAPIManager
and pass themselves (self
) as the record
, when applicable.
createRecord
find
findQuery
findAll
findMany
updateRecord
deleteRecord
rollback
, see http://emberjs.com/api/data/classes/DS.Model.html#method_rollback Here are the headers so far:
- (instancetype) createRecord:(NSDictionary *)properties;
- (PMKPromise *) findById:(SLNid)nid;
- (PMKPromise *) findQuery:(NSDictionary *)query;
- (PMKPromise *) findAll;
- (PMKPromise *) findMany:(NSArray *)ids;
- (instancetype) updateRecord:(NSDictionary *)properties;
- (instancetype) deleteRecord;
setupData
, see http://emberjs.com/api/data/classes/DS.Model.html#method_setupData Inspecting Core Data attributes: http://oleb.net/blog/2011/05/inspecting-core-data-attributes/
Ideally use something like https://github.com/adamelliot/Inflections to generate the result for the type
method.
See https://github.com/Streamlyne/web-app/blob/develop/app/scripts/adapters/streamlyne_adapter.js#L101-L104 for what the web-app does.
filter
, in addition to findQuery
for an offline method for querying. Also add findQuery:withFilter
. Filter
is a function boolean-returning block. Should we make it async? findQuery
already is. Sure, let's go async. One-Up Ember's implementation. Boo-yeaahhh.
Rename
Node
toModel
See http://emberjs.com/api/data/classes/DS.Model.html