Type of the items.
Readonlyhastrue when at least one sort is set.
ReadonlysortsCurrent sorts, by priority: the first one wins.
ReadonlysortsMaximum number of sorts, 0 when unlimited. See addSort.
Appends a sort, replacing the sort on the same field, if any (the replacement goes to the end, i.e. to the lowest priority). When the limit is reached and no sort is replaced, nothing changes but the events are raised anyway with the unchanged sorts.
OptionalbuildAdds the contribution of the extension to the payload. Build phase, run in the order of the keys and completed before any item is read.
Payload built by the previous extensions.
Optionalsignal: AbortSignal
Signal of the read, aborted when the read is superseded.
the payload for the next extension.
Removes every sort.
Releases the held resource. Implementations should be safe to call more than once.
a promise that settles once the resource has been released.
Registers a handler for an event.
Name of the event to listen to.
Event to subscribe to.
Callback invoked on every trigger of event.
a subscription; dispose it to remove this single handler.
OptionalreadWraps the reading of the items. Read phase: the extension is a layer of
the onion around the reader, next the layers inside it (the inner
extensions, then the reader of the data source). The payload is the
whole query, whatever the position of the extension.
next may be called zero times (e.g. a cache hit: the reader is never
invoked), once, with this or another payload, or several times (e.g. a
payload split into several reads whose results are merged); every call
runs the inner layers and the reader again, so the hooks and the events
of the inner extensions may fire as many times. The result may be
transformed before being returned, and flows outward: the outermost
extension transforms last.
The whole query, built by the build phase.
Reads the items through the inner layers and the reader; the signal of the read is bound already.
Optionalsignal: AbortSignal
Signal of the read, aborted when the read is superseded, for the reads of the extension itself.
the items for the outer extension, or the data source.
Removes the sort on a field, if any.
Field no longer sorted.
Extension that adds the list of Sort to the payload. Every mutation raises its own event at once and schedules the debounced
sortsChangeevent (see SortExtensionEvents).