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

Add view support #27

Closed
18 tasks done
DarkoKukovec opened this issue Feb 3, 2018 · 0 comments
Closed
18 tasks done

Add view support #27

DarkoKukovec opened this issue Feb 3, 2018 · 0 comments

Comments

@DarkoKukovec
Copy link
Member

DarkoKukovec commented Feb 3, 2018

Add support for views (similar to sql views) - add a view to the collection that holds a custom list of models

Requirements:

  • Has a name in collection (optional)
  • Belongs to a collection
  • Has a type (model)
  • Can have a sort function
  • Can force uniquenes
  • Has a subset of collection methods
    • remove()
    • removeAll()
    • length
    • list (observable)
    • snapshot/toJSON
    • jsonapi mixin
      • fetch()
      • fetchAll()
      • sync()
  • view standalone serialization/deserialization
  • view in collection serialization/deserialization
  • docs

Creation:

collection.addView(name, {
  type: modelType,
  sort: sortFn, // optional
  unique: true, // optional
});
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