Skip to main content

Server-side operations

Adapter-backed datasets send the current effective query state through FdcDataLoadRequest. An adapter that declares the required capabilities executes those operations against its source and returns final rows to the dataset.

Effective query state

A load request can include:

  • source and dataset filters;
  • active sorts;
  • search text, mode, fields, and case-sensitivity;
  • offset and limit;
  • total-count requests;
  • selected-key restrictions.

The adapter should treat returned rows as the final result for that request. A remote adapter should not return an unfiltered source and expect the dataset to repeat server operations locally.

Filtering

Adapter filters use FdcDataAdapterFilter and FdcDataAdapterFilterOperator. String matching can carry case-sensitivity explicitly.

const FdcDataAdapterFilter(
fieldName: 'state',
operator: FdcDataAdapterFilterOperator.equals,
value: 'WA',
)

Adapters should only advertise filtering when they can preserve the supported operator semantics.

Sorting

Sort requests are ordered. A backend should apply them in list order so multi-column sorting remains deterministic.

For paged data, include a stable tie-breaker when the business sort is not unique.

Paging and counts

Paged loads use offset/limit request values and can request totalCount. The returned count describes the complete matching result set before page slicing.

Infinite paging still uses backend page requests; the dataset accumulates loaded pages for presentation.

Search requests include text, mode, case-sensitivity, and optional target fields. The backend owns execution of the requested search contract for remote data.

Aggregates

Aggregate requests use the current effective filter and search state but deliberately omit paging limits. This ensures a sum, count, minimum, maximum, or average describes the complete matching result set rather than only the visible page.