The filter a query on T accepts: conditions on the attributes of T and of
every entity in its partition, combined with AND, plus $or blocks.
It is a union with one member per partition entity, keyed by a single type,
plus members for a type array and for no type at all, so naming one
entity's type limits the block to that entity's attributes. Alias for
FilterParamsForEntities applied to PartitionEntities.
Reusing a filter. A query narrows its results by the filter's literal
type: the type it names, its keys and its $or blocks. A filter written at
the call has that type, and so does one checked with
satisfies TypedFilterParams<T>, which also gets every check a literal at the
call gets. A filter whose type is this annotation (a function parameter, an
object property) is accepted too, but the annotation widens it to the whole
union, so the query cannot narrow by it and returns the whole partition.
Beside an skCondition that names an entity, the query accepts only
SKScopedFilterParams for that sort key condition: a value typed
TypedFilterParams<T> is refused there, because it also offers other
entities' keys and type values that cannot match the rows the sort key
selects.
The filter a query on
Taccepts: conditions on the attributes ofTand of every entity in its partition, combined with AND, plus$orblocks.It is a union with one member per partition entity, keyed by a single
type, plus members for atypearray and for notypeat all, so naming one entity'stypelimits the block to that entity's attributes. Alias for FilterParamsForEntities applied to PartitionEntities.Reusing a filter. A query narrows its results by the filter's literal type: the
typeit names, its keys and its$orblocks. A filter written at the call has that type, and so does one checked withsatisfies TypedFilterParams<T>, which also gets every check a literal at the call gets. A filter whose type is this annotation (a function parameter, an object property) is accepted too, but the annotation widens it to the whole union, so the query cannot narrow by it and returns the whole partition.Beside an
skConditionthat names an entity, the query accepts only SKScopedFilterParams for that sort key condition: a value typedTypedFilterParams<T>is refused there, because it also offers other entities' keys andtypevalues that cannot match the rows the sort key selects.