Skip to main content

Combined Pagination

How DHA 0.4.0 pages a list combined from both Delegates.

List Energy Account Invoices and List Energy Account Billing Transactions are paginated across the records of both Delegates, as if they came from one source:

  • Pages and totals cover the combined set. The page and page size are those of the Data Adapter Specification: page 1 and 25 records a page when you name neither. The total record and page counts are those of the combined set, and include any duplicate records.
  • Order is the specification's. Billing transactions are newest execution time first. Invoices are newest issue date first, then newest due date first, with invoices that have no due date last.
  • Reading only what a page needs. DHA reads the first page of each Delegate at your page size, and the last page of each Delegate that holds records but the last one. From those it works out where each Delegate's records sit in the combined set, and reads only the further pages your page needs. When one Delegate's records sort among the other's, DHA reads every page of both and pages the combined set in full.
  • The same range on every page. Every page DHA reads uses the same date range, worked out once as set out in Date ranges.
  • An invalid page is refused before either Delegate is called.