Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Model class #8

Open
Glavin001 opened this issue Jul 14, 2014 · 11 comments
Open

Improve Model class #8

Glavin001 opened this issue Jul 14, 2014 · 11 comments

Comments

@Glavin001
Copy link
Member

Rename Node to Model
See http://emberjs.com/api/data/classes/DS.Model.html

@Glavin001 Glavin001 self-assigned this Jul 14, 2014
@Glavin001 Glavin001 added this to the v0.2.0 milestone Jul 14, 2014
@Glavin001 Glavin001 mentioned this issue Jul 15, 2014
4 tasks
@Glavin001
Copy link
Member Author

  • keyForAttribute
  • keyForRelationship

@Glavin001
Copy link
Member Author

The following should simply forward to the SLAPIManager and pass themselves (self) as the record, when applicable.

  • createRecord
  • find
  • findQuery
  • findAll
  • findMany
  • updateRecord
  • deleteRecord

@Glavin001
Copy link
Member Author

@Glavin001
Copy link
Member Author

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;

@Glavin001
Copy link
Member Author

@Glavin001
Copy link
Member Author

Inspecting Core Data attributes: http://oleb.net/blog/2011/05/inspecting-core-data-attributes/

Glavin001 added a commit that referenced this issue Jul 17, 2014
…Adapter, and Store. Unit Tests passing for Authentication and partial model-mapping, working for SLUser.
Glavin001 added a commit that referenced this issue Jul 22, 2014
Glavin001 added a commit that referenced this issue Jul 23, 2014
@Glavin001
Copy link
Member Author

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.

@Glavin001
Copy link
Member Author

@Glavin001
Copy link
Member Author

@Glavin001
Copy link
Member Author

  • 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.

Glavin001 added a commit that referenced this issue Aug 14, 2014
- Add method for reloadRecord in model class.
- Add unit tests for find:byId and reloadRecord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant