ms-alumnos uses offset-based (page / limit) pagination for theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Distribuidos-Org/ms-alumnos/llms.txt
Use this file to discover all available pages before exploring further.
find_all_alumnos message pattern. Rather than accepting a raw SQL offset, the service exposes two intuitive parameters — page and limit — via the PaginationDto class defined in src/common/dto/pagionation.dto.ts. Both parameters are optional and default to sensible values, so callers that omit them will always receive the first 10 records.
PaginationDto fields
The 1-based page number to retrieve. Must be a positive integer
(
@IsPositive()). Omitting this field is equivalent to passing 1.The maximum number of records to return in a single response. Must be a
positive integer (
@IsPositive()). Omitting this field is equivalent to
passing 10.How pagination works
AlumnosService.findAll() calls TypeORM’s findAndCount method with a computed skip offset and the requested take window:
skip: (page - 1) * limit translates the human-friendly page number into a zero-based SQL OFFSET. For example, page: 3 with limit: 10 produces skip: 20, meaning the query skips the first 20 rows and returns rows 21–30. findAndCount issues a single query that returns both the page of records and the total row count, avoiding a separate COUNT(*) round-trip.
Response shape
The array of
Alumno records for the requested page. May be an empty array
[] if page exceeds the available data.Total count of all
Alumno records currently in the table, regardless of the
requested page or limit.The page number that was used to generate this response. Mirrors the
page
value sent in the request (or 1 if it was omitted).The limit that was used to generate this response. Mirrors the
limit value
sent in the request (or 10 if it was omitted).Calculating total pages
Usetotal and limit from the response to derive navigation metadata on the client side: