[
https://issues.apache.org/jira/browse/OLINGO-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13906882#comment-13906882
]
Chandan V.A commented on OLINGO-162:
------------------------------------
Hi Miki,
My understanding is that $skip and $top works with the result that gets fetched
from the data source after applying $filter query options. This implies (as
Stephan explained) $top and $skip works within the collection or the page after
applying skiptoken.
So in your example you will always get 10 records because of page size 10.
[~klevenzs]
Correct me if I am wrong. Because in OData JPA processor $skip and $top are
applied on the entries within a page and not on the entries that are actually
there on the data source.
Regards
Chandan
> 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
> Assignee: Stephan Klevenz
> 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)