baugarten/node-restful — pull request #29 by samsaga2 (2013-06-11 16:03:59+00:00)
Title: Added filter fields

I've added a simple way to filter queries by fields. The string __ is for identify the filter func (equals by default). I also added select and sort filter functions.

Added filters: select and sort.
Filter fields funcs: gte, gt, lt, lte, ne and regex.

Examples:

http://localhost/api/city?name=Barcelona
http://localhost/api/city?population__gte=50000&population__lte=80000
http://localhost/api/city?name__regex=a.*b
http://localhost/api/city?select=name%20population&sort=population