Skip to content

Document PagesInterface::getNbPages() and Page::$nbPages - #382

Merged
koriym merged 2 commits into
masterfrom
docs/pages-getnbpages
Aug 30, 2026
Merged

koriym merged 2 commits into
masterfrom
docs/pages-getnbpages

Conversation

@koriym

@koriym koriym commented Jul 5, 2026 •

Copy link
Copy Markdown
Member

Summary

The pagination example in database.media.md (JA and EN) showed only count() and the Page properties (total/current/hasNext/hasPrevious/maxPerPage). This adds the new page-count API to the example so readers can obtain the total number of pages without recomputing ceil(count / perPage) by hand.

Changes

  • manuals/1.0/ja/database.media.md
  • manuals/1.0/en/database.media.md

Both files:

  • Mention getNbPages() in the lead paragraph.
  • Add $pages->getNbPages() to the code example.
  • Add $page->nbPages to the Page property list.

Depends on

This documents APIs that are not yet released. Merge after the following library PRs land and are released:

If either library PR changes its API during review, this manual PR should be updated to match before merging.

Draft until the library PRs are merged and released.

Summary by CodeRabbit

  • Documentation
    • ページネーションの説明を更新し、getNbPages() による総ページ数の取得方法を明確にしました。
    • 件数取得・ページ取得の遅延実行に加え、総ページ数の参照方法と関連プロパティの例を追記しました。

The pagination example showed only `count()` and the Page properties
(total/current/hasNext/hasPrevious/maxPerPage). Add the new
`PagesInterface::getNbPages()` and the `Page::$nbPages` property to
the example, in both the JA and EN database.media.md, so readers can
obtain the total number of pages without recomputing
`ceil(count / perPage)` by hand.
@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7efb8a48-017d-4a57-ad10-00e24239c171

📥 Commits

Reviewing files that changed from the base of the PR and between bd39191 and e74fa0f.

📒 Files selected for processing (2)
  • manuals/1.0/en/database.aura.md
  • manuals/1.0/ja/database.aura.md

Walkthrough

英語版と日本語版のページネーションマニュアルを更新しました。getNbPages()と$page->nbPagesによる総ページ数の取得方法を追加し、遅延実行の説明を調整しました。

Changes

ページネーションドキュメント更新

Layer / File(s) Summary
getNbPages()の説明とコード例追加
manuals/1.0/en/database.media.md, manuals/1.0/ja/database.media.md, manuals/1.0/en/database.aura.md, manuals/1.0/ja/database.aura.md
PagesInterfaceのgetNbPages()による総ページ数取得を説明し、$page->nbPagesの参照例を追加しました。count()とページ配列アクセスでSQLが実行されるタイミングの説明も更新しました。

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PagesInterface::getNbPages() と Page::$nbPages の文書化という変更内容を正確に要約しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/pages-getnbpages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@koriym
koriym marked this pull request as ready for review August 30, 2026 01:53
@koriym
koriym merged commit 4b17657 into master Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant