Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: ABNF, Protocol
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      support $count as a replacement for $inlinecount as a query parameter and expand options. i.e.;

      • /customers?$count=true returns customers with inline count
      • /customers?$count=1 returns customers with inline count
      • /customers?$expand=orders($count=true) returns customers and their orders with inline count
      • /customers?$expand=orders($count=1) returns customers and their orders with inline count

      change the ABNF for $inlinecount to:
      inlinecount = '$count

      Show
      support $count as a replacement for $inlinecount as a query parameter and expand options. i.e.; /customers?$count=true returns customers with inline count /customers?$count=1 returns customers with inline count /customers?$expand=orders($count=true) returns customers and their orders with inline count /customers?$expand=orders($count=1) returns customers and their orders with inline count change the ABNF for $inlinecount to: inlinecount = '$count
    • Resolution:
      Show
      Accepted: https://www.oasis-open.org/committees/download.php/49055/odata-meeting-35_on-20130502-minutes.html#odata-323

      Description

      Today a client specifies that they want a count of entities returned inline by specifying the query option $inlinecount=allpages.

      the value "allpages" is meaningless and implies there is some other "singlepage" or "mostpages" or "everyotherpage" option.

        Attachments

          Activity

          Hide
          raman99 Ramanjaneyulu Malisetti (Inactive) added a comment -

          It is good suggestion.

          However, $inlinecount sets the expectation that server returns the exact count. But sometimes exact count may not be available or to compute exact count server needs to make multiple calls on data source that in worst case can take the double the time

          For instance, server has to make enumerate() call to get entities because server has huge dataset for requested query. So, it can return one page with reasonable dataset size and include link to the next page with $skiptoken. In this case if request includes $inlinecount then server has to make enumerate() call twice, one for count and second for data.

          How to convey to the client that returned count is approximate value and count value may be changed in the next page?

          Show
          raman99 Ramanjaneyulu Malisetti (Inactive) added a comment - It is good suggestion. However, $inlinecount sets the expectation that server returns the exact count. But sometimes exact count may not be available or to compute exact count server needs to make multiple calls on data source that in worst case can take the double the time For instance, server has to make enumerate() call to get entities because server has huge dataset for requested query. So, it can return one page with reasonable dataset size and include link to the next page with $skiptoken. In this case if request includes $inlinecount then server has to make enumerate() call twice, one for count and second for data. How to convey to the client that returned count is approximate value and count value may be changed in the next page?
          Hide
          ralfhandl Ralf Handl added a comment -

          As this option is boolean, "yes"/"no" or "true"/"false" would be more natural values.

          We could even omit the "value" and make presence of this option sufficient:

          GET ~/Customers?$inlinecount

          Show
          ralfhandl Ralf Handl added a comment - As this option is boolean, "yes"/"no" or "true"/"false" would be more natural values. We could even omit the "value" and make presence of this option sufficient: GET ~/Customers?$inlinecount

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: