How can we improve Breeze.js?

Support $inlinecount in queries

The OData 2.0 spec describes the $inlinecount parameter (http://www.odata.org/documentation/uri-conventions#InlinecountSystemQueryOption) as a way to include with query results the count of all records that satisfy the filter clause without respect to the paging parameters (top and skip) that may be in the query request.

36 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Ward BellWard Bell shared this idea  ·   ·  Admin →
    completed  ·  AdminAdminAdmin (Admin, Breeze.js) responded  · 

    0.75.1 is now live, and adds an ’inlineCount" method to the EntityQuery.

    This provides support for providing, in addition to standard query results, the count of records that would be returned by this query if no ‘skip’ or ‘take’ option were included on the query.

    In other words, the count is calculated after applying any filters/where clauses but before any skip/take operations.

    See the API Docs for more details. Both OData and WebApi endpoints are supported with this feature.

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Ward BellWard Bell commented  · 

        I feel dirty but I've added a hack workaround for $inlinecount until we add this feature. The hack is unsupported and you must remove it from your code once we support $inlinecount for real. Use at your own risk: http://www.breezejs.com/inlinecount-hack

      • Ward BellWard Bell commented  · 

        @Anonymous - I am intrigued by your suggestion but I'm not sure how it should work. When you are the author of the controller method, how would you specify and fill in the custom object? Would you expect to do so before or after the query had been processed?

      • Anonymous commented  · 

        I would suggest ability to return additional Data with the IQueryable be implemented as well. Ability to return custom structure so that additional data can be returned in a custom structure, leaving it open to be customized by the consumer so if needed additional properties & data can be returned.

      Feedback and Knowledge Base