Files
digital-psychology/.ai/patterns/pagination.md
T
jackyu66gitandCursor 2fb1dfee14 chore: seal Design Vision v1 and monorepo scaffold
Archive the differentiated YuXinGu product docs, AI engineering system,
design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity
over early innovation (see .ai/product/STRATEGY.md).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:00:44 +08:00

23 lines
320 B
Markdown

# Pattern: Pagination
## Query
`?page=1&page_size=20`
Defaults: page=1, page_size=20, max page_size=100.
## Response data
```json
{
"list": [],
"total": 0,
"page": 1,
"page_size": 20
}
```
## SQL
`LIMIT $n OFFSET $m` with bound params. Always return `total` via `COUNT(*)` (or approximate only with ADR).