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

should we add some doc controls? #9

Closed
mickeyn opened this issue Oct 15, 2015 · 3 comments
Closed

should we add some doc controls? #9

mickeyn opened this issue Oct 15, 2015 · 3 comments

Comments

@mickeyn
Copy link
Owner

mickeyn commented Oct 15, 2015

example: if you want to get just the resources without the relationships,links,etc.
I didn't find anything in the spec, but we can easily implement such controls (using the filter param?)

@stevan
Copy link
Collaborator

stevan commented Oct 15, 2015

I think the filter param can handle the relationship part because the attributes and relationships keys are supposed to occupy the same namespace, so it naturally follows that the filter param is not just for filtering out attributes, but also relationships.

This does mean that we definitely need to hand the filter down to the DAO and let it handle these duties (no need to have it make additional DB calls for relationships that we don't want in the output, etc).

@mickeyn
Copy link
Owner Author

mickeyn commented Oct 15, 2015

I was referring to "I want this document without the relationship structure", not to filter resources based on relationship values.

The other one is also a good thing to do, so here is a list of ideas we can do:

  1. support document-level control, so the client can force not receiving what it doesn't want (e.g. "no relationships, please")
  2. support filtering based on relationship/links/included(?) values
  3. (another idea) extend filtering syntax to indicate more than just exact values to match (syntax for expressing various operations: =,>,<,>=, <=,and,or,not...)

thoughts?

@stevan
Copy link
Collaborator

stevan commented Nov 16, 2015

We agreed that adding logic into the filters to support the various operators (filter[id:gt]=1 filter on IDs greater then 1) and passing this down to the DAO layer to do whatever makes sense for it.

@stevan stevan closed this as completed Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants