Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11230

Support Limit and Offset via JcrResourceProvider / findResources

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • JCR
    • None

    Description

      Problem Statement

      In addition to not supporting global limits, there are good reasons that a developer may want to return only a sub-set of the query results when executing a query. For example returning the 10 latest uploaded files.

      Currently this can be accomplished by executing a query and then only iterating to the 10th item, however a much larger query set may be fetched from the node store than required to service the intended use case.

      In addition, to support paging, the current implementation would require retrieving and iterating over the Resources until the desired start point is found then reading the subsequent Resources.

      However changing the API contract for the ResourceResolver to either add a new method with the start and limit values would have a non-insignificant ripple effect into the implementations, mocks and providers which would be required to support this new method.

      Attachments

        Issue Links

          Activity

            People

              dklco Dan Klco
              dklco Dan Klco
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: