OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1555) Strengthen definitions for $orderby, $top and $skip


Heiko Theissen created ODATA-1555:
-------------------------------------

             Summary: Strengthen definitions for $orderby, $top and $skip
                 Key: ODATA-1555
                 URL: https://issues.oasis-open.org/browse/ODATA-1555
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Bug
          Components: Protocol
            Reporter: Heiko Theissen


h2. Total or partial order?

[OData-Protocol, section 11.2.6.2|https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionorderby] speaks of "the order" in which items are returned. Must this be a total order, or only a partial order? A partial order would not allow paging with {{$top}} and {{$skip}}. But not all services may be able to produce a total order.

This should be clarified.

h2. Further implications of partial ordering

[OData-Protocol, section 11.2.6.3|https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptiontop] seems to allow n _arbitrary_ items to be returned:
{quote}a non-negative integer n that limits the number of items returned from a collection.
{quote}
The next sentence sounds as if a number was returned:
{quote}The service returns the number of available items up to but not greater than the specified value n.
{quote}
[OData-Protocol, section 11.2.6.4|https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_SystemQueryOptionskip] is clearer:
{quote}excludes the first n items of the queried collection from the result. The service returns items starting at position n+1.
{quote}
Both definitions assume that "the first n items" always exist. But in general the result set is neither totally ordered (in which case "the first n" would be well-defined) nor totally unordered (in which case n arbitrary items could be returned or skipped). After an {{$orderby}}, the result set may be only partially ordered.

The definitions of {{$top}} and {{$skip}} should make clearer what freedom to choose n items the server has.



--
This message was sent by Atlassian Jira
(v8.3.3#803004)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]