This commit finalizes the complex querying logic: - **Refactor `GetAll` (sqlite.go):** Reworks the internal logic to ensure the total number of matching records (`totalCount`) is calculated via a separate COUNT query *before* applying LIMIT/OFFSET. - **Corrected Pagination:** Adds an explicit check in `GetAll` to return an empty `items` list when `limit=0`, while still reporting the correct `totalCount`. - **API Handler Update:** Consumes the accurate `totalCount` returned by the Store layer and includes it in the final API response under the `totalItems` field. |
||
|---|---|---|
| .. | ||
| repository.go | ||
| sqlite.go | ||