[ https://issues.apache.org/jira/browse/OLINGO-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904271#comment-13904271 ]
Stephan Klevenz commented on OLINGO-162: ---------------------------------------- $skiptoken, $top and $skip are explained in following section of OData 2.0 spec: 2.2.3.6.1.7-9 I try to summarize: $skip: number - seeking for n+1 record within a collection e.g. c(1,2,3,4,5,6,7,8,9) $skip=3 => c(4,5,6,7,8,9) $top: number - seeking n records of a collection e.g. c(1,2,3,4,5,6,7,8,9) $top=3 => c(1,2,3) $skiptoken: opaque token - defined by a server to render a next link The skiptoken identifies the starting point of a collection and the uri literal is string: 'any token'. In simple cases the token can be equal the id of an entity. > Use $skiptoken, $top and $skip > ------------------------------ > > Key: OLINGO-162 > URL: https://issues.apache.org/jira/browse/OLINGO-162 > Project: Olingo > Issue Type: Question > Components: odata2-core > Affects Versions: V2 1.1.0 > Reporter: M Carissimi > Priority: Minor > Attachments: JPAPage.java > > > Hello, > I use $skiptoken to implement pagination in my service. What should the > service return when $skiptoken is used in conjunction with $top and $skip? > Should the numbers specified in $top and $skip be considered relative to the > starting point of the page being displayed or should they be considered > absolute values? > For example, if I have $skiptoken=10&$top=4 should the service return the > first 4 items of the page starting with entry number 10 or should the service > return nothing because $skiptoken > $top? If the latter is true, then to > obtain the first 4 entres on the second page one would have to specify > $skiptoken=10&$top=14. Which is correct? > Similarly, if I have $skiptoken=10&$skip=2, should the service return the > entres on the page starting with element 10 but skipping the first 2 entres? > Lastly, I understand that $skiptoken should represent the id of the first > entry to display on a page. What should the id be for entities with compound > keys (i.e. a name and a date)? > Cheers > Miki -- This message was sent by Atlassian JIRA (v6.1.5#6160)