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

Support conditional queries #1

Closed
4 tasks done
ekryski opened this issue Oct 25, 2015 · 0 comments
Closed
4 tasks done

Support conditional queries #1

ekryski opened this issue Oct 25, 2015 · 0 comments
Milestone

Comments

@ekryski
Copy link
Member

ekryski commented Oct 25, 2015

Conditionals we should support:

  • $in
  • $or
  • $nin
  • $not

By default all queries are and queries so that isn't required.

I don't think we need to support complex conditional queries, at least not off the bat, but simple ones should work the same as when using feathers-mongo and feathers-mongoose.

Let's take a todo list example and say I want to get todos that were created on or after a certain date and only if they have a "complete" or "incomplete" status. When sending a GET request to /todos, the non-encoded url params might look like this:

{
  date: {
    $gte: "2015-10-25T18:13:12.843Z"
  },
  $or: [
    { "status": "complete" },
    { "status": "incomplete" }
  ]
}
@ekryski ekryski modified the milestone: 1.0 release Oct 25, 2015
@ekryski ekryski changed the title Support $or queries Support conditional queries Oct 26, 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

1 participant