Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2884 Update JMAP implementation to conform to RFC 8620/8621
  3. JAMES-3382

Email/Query Pagination 1 - handle pagination with position

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.6.0
    • 3.6.0
    • JMAP
    • None

    Description

      WHY

      As a client I want to be able to get a long list of results in several operations.
      As a client i want to be able to start fetching the result only since a given index.

      On this ticket we will only consider positive position.
       {{ position: Int (default: 0) The zero-based index of the first id in the full list of results to return.

      If a negative value is given, it is an offset from the end of the list. Specifically, the negative value MUST be added to the total number of results given the filter, and if still negative, it’s clamped to 0. This is now the zero-based index of the first id to return.

      If the index is greater than or equal to the total number of objects in the results list, then the ids array in the response will be empty, but this is not an error.}} request {{ [[ "Email/query",{
      "accountId": "ue150411c",
      "position": 5
      }, "0" ]]}}

      HOW

      • accept a 'position' parameter in the query request.

      DOD

      • write an integration test demonstrating that when the client provide a position parameter, only the result since this position are returned in the response.
      • write an integration test demonstrating that if the client provide a position parameter bigger than the total number of results then the response is empty and there is no error.
      • run the tests against the distributed version of the contract

      Attachments

        Activity

          People

            aduprat Antoine Duprat
            remi_kowalski Rémi Kowalski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: