-
Notifications
You must be signed in to change notification settings - Fork 246
Description
Current version has the query building and handling of all filterables integrated in the model module. In your rewrite it would be useful to separate those things out of there.
usecase: user has a custom like: users/<id>/log doesn't matter what log is, but it's not a detail route, it is another list route. it would be very useful for this list route to be able to use the same filtering like ?limit=5 or ?status__ne=error .... so If you separate that out in a module of it's own, either another npm module or just a separate module within node-restful. I could see it being reused to build a filterable query which automatically uses the req params to search in the db.
This is me thinking out loud while I was sort of hacking away at a querybuilder suddenly realising you already do all of that within your node-restful module...