Commit c980657
fix: compute totalPages from unpaginated count query
The objects_count query reused the same SELECT that already had
LIMIT/OFFSET applied, so count() always returned at most page_size
rows, making totalPages always 1 regardless of actual row count.
Build a separate count query with only filters and joins (no
pagination) so that totalPages reflects the true number of pages.
Closes #103
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a1a4fc5 commit c980657
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
428 | 434 | | |
429 | 435 | | |
430 | | - | |
| 436 | + | |
431 | 437 | | |
432 | 438 | | |
433 | 439 | | |
| |||
0 commit comments