On Oct 30, 2012, at 5:53 PM, Matthias Wessendorf wrote:

Hello!


On Tue, Oct 30, 2012 at 10:44 PM, Douglas Campos <qmx@qmx.me> wrote:
Howdy!

As we discussed on our team meeting today, having basic query and pagination support would be cool.

Here are some suggestions, gathered from previous conversations around the topic, and from some BaaS providers in the wild.

Paging:

1) /cars/?limit=10&offset=3
2) /cars/?limit=10&skip=3

Is the skip the number of pages, or the literal item count to start on?

Also, we would want a way to get back a total #, and page #'s give a page size.  This may be a separate call - wdyt?


Query:

1) /cars/query?color=blue
2) /cars/?query={"color":"red", "owner":"summers"}
3) /cars/?where={"brand":"BMW"}
4) /cars/?query={"engine":{"cylinders": 8}}
5) /cars/?query={"engine":{"cylinders":{"$gt":6}}}

This is not set into stone, just ideas,

I guess it's a matter of agreeing :) the main work is on the "ag
server component".

Question.... do we want to keep it flexible? E.g. if AG clients are
used for a backend that does not use "limit" for the pagination?
(I guess kinda similar to what we have on the endpoints, where you can
override the default)


Where would you override this?  In the pipeline creation?

Also, and opinions on using matrix parameters instead of query parameters?  For now we would need to combine with #PathParam & PathSegments.  See http://docs.jboss.org/resteasy/docs/3.0-beta-1/userguide/html_single/index.html#_PathParam_and_PathSegment for details.

This would allow future nesting of queries.


and I do think that anything above exact matches should go after 1.0

fine w/ me

+1


-M


Thoughts?

-- qmx


_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev