Type of the items.
Readonlyhastrue when at least one projection is set.
ReadonlyprojectionsCurrent projections, in insertion order; empty means "every field".
Appends a projection.
Projection to add; ignored, without events, when a projection on the same field already exists.
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 projection.
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 projection on a field, if any.
Field no longer projected.
Replaces every projection.
New projections, taken as they are (duplicates are not removed).
Extension that adds the list of Projection to the payload. Every mutation raises its own event at once and schedules the debounced
projectionsChangeevent (see ProjectionExtensionEvents).