jirutka / rsql-parser

Parser for RSQL / FIQL – query language for RESTful APIs
731 stars 156 forks source link

How to use limit and offset #14

Closed t2349 closed 8 years ago

t2349 commented 8 years ago

Hi, All,

Thanks for all your contribution to the project, I am using this library for my project, I like it very much, but I have a problem about how to set the limit and offset of all the records I retrieve, I checked the testLimit() in the JUnit testing code, but when I use this url: /rsql?search=userName==S;limit(0,10); I got exception: Request processing failed; nested exception is cz.jirutka.rsql.parser.RSQLParserException: cz.jirutka.rsql.parser.ParseException: Encountered " "(" "( "" at line 1, column 20.

So what is the url format to use limit for pagination?

Thanks Dave

jirutka commented 8 years ago

Please see #9. Just use plain URI parameters offset and limit, don’t mix pagination with filtering/searching.