SQL Server · Types · Queries
ArxPagingInfo
Definition
- Namespace
ARX.SDK.Query- Package
ARX.SDK
public class ArxPagingInfoPaging for RetrieveMultiple: the page size (Count, 5,000 by default) and the 1-based page number. The total is opt-in (ReturnTotalRecordCount): it counts every matching row, a second statement in the same round trip.
Constructor
ArxPagingInfo()Page 1 of 5,000 rows, without the total.
Properties
int Count { get; set; }The page size: at most this many rows per page.
int PageNumber { get; set; }The page to read, from 1.
bool ReturnTotalRecordCount { get; set; }True to count every matching row as well (TotalRecordCount, TotalPageCount): a second statement in the same round trip. Leave it off when the screen doesn't show the total.
string? PagingCookie { get; set; }Token paging: the
ArxEntityCollection.PagingCookieof the previous page, to read the page after it; null (the default) for the first page. The cookie is opaque, written by the provider that read the previous page, for the same query: never build or change one. With a cookie, leavePageNumberat 1. Only providers that declareArxCapability.TokenPagingaccept it; the others refuse it (ARX8001 NotSupported) rather than ignore it.
Methods
ArxPagingInfo? Next(Services.ArxEntityCollection page)The paging that reads the page after
page, on any provider: by its cookie where the provider returned one (MongoDB, DynamoDB), by the next page number where it didn't (PostgreSQL, SQL Server, MySQL); null when no page follows. Same page size; the total isn't asked for again. A loop that only passes the cookie on reads the first page again on a provider without cookies, so a loop meant to run everywhere ends each page withquery.PageInfo = query.PageInfo.Next(page)and stops on null.Parameter Type Description pageServices.ArxEntityCollectionThe page the query with this paging returned.
Usage
A line from a verified sample; the full, runnable code is on its page.
query.PageInfo = new ArxPagingInfo { Count = 2, ReturnTotalRecordCount = true };Read a function that returns a table, scenario 2
Used in:
- Page through resultsRetrieveMultiple
- Read a function that returns a tableRetrieveMultiple
- Export a large table in pagesRetrieveMultiple
- Paging in depth: the total is opt-in, ask once, load more, Top, seek pagingRetrieveMultiple
- Views in depth: computed criteria, links both ways, declared ids and lookups, column boundariesRetrieveMultiple
- Page through a procedure's result: the procedure pages itself, ARX pages a function, ARX pages a result setExecute
- Export what a procedure returns, page by pageExecute