PageSpec
sourceSpecifies a page of a query.
A page specification is a combination of a Query specification and a Slice.
Slice
The slice communicates the intent of the page, so it need not refer to an extant range of the resultset. For example, if the query only returns three records, it is still valid to request a page of the first ten records. In those cases, the page will still receive the correct updates.
Selected fields
The caller may nominate a subset of fields to select. The domain of fields is the input domain of the query, which is the total set of fields of the source model, plus any fields added by joins. Fields added by joins are given a prefix: for foreign key equijoins, the prefix is the name of the foreign key field, and for predicate joins, the prefix is the alias given to the join. The prefix and foreign field name are joined by a dot (.).
If no fields are selected, the entire domain of fields is returned.
Constructors
new PageSpec<T extends Model<string, T> = Model<string>>(query: Query, slice: Slice, selectedFields: keyof T[] = []): PageSpecsource
Properties
The query of which this is a page.
selectedFields: keyof T[]source
The set of fields to select from the resultset.
The range of records to select from the resultset.
Methods
Instance methods
implements
Hashable.toHash
toString(): stringsource
Inherited methods
applyFieldGuards<T>(target: AbstractCtor<T>, item: any, tracer: Tracer): Maybe<T>source
inherited from
ValidatableType.applyFieldGuards
validate<T extends ValidatableType<T>>(this: AbstractCtor<T> & CanHaveValidateHook<T>, item: any, tracer: Tracer = ...): Maybe<T>source
inherited from
ValidatableType.validate
withFields<T extends FieldDict>(fields: T): Validatable<MaterialisedType<T>> & Ctor<MaterialisedType<T>>source
inherited from
ValidatableType.withFields