Skip to content

refactor(database): update README and tests to use registerWorker and…#175

Merged
sergiofilhowz merged 1 commit into
mainfrom
fix/readme-code-examples
May 21, 2026
Merged

refactor(database): update README and tests to use registerWorker and…#175
sergiofilhowz merged 1 commit into
mainfrom
fix/readme-code-examples

Conversation

@sergiofilhowz
Copy link
Copy Markdown
Contributor

@sergiofilhowz sergiofilhowz commented May 20, 2026

… trigger

Replaced instances of call with registerWorker and trigger in the database README and test files to align with the new function naming conventions. This change enhances clarity and consistency across the codebase. Additionally, updated the package-lock.json to reflect the new package name for the tests harness.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Database quickstart guide updated with new code examples showing current SDK usage
    • Storage quickstart guide updated with new code examples showing current SDK usage
    • Test harness reference implementation updated with current patterns
    • Examples now reflect the latest recommended approaches for database and storage operations

Review Change Stack

… trigger

Replaced instances of `call` with `registerWorker` and `trigger` in the database README and test files to align with the new function naming conventions. This change enhances clarity and consistency across the codebase. Additionally, updated the package-lock.json to reflect the new package name for the tests harness.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Building Building Preview May 20, 2026 11:42pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 11 skipped (no docs/).

Layer Result
structure
vale
ai

Three for three. Nicely done.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 70a959e8-b4aa-4bc3-9a48-e3ee8b9d0644

📥 Commits

Reviewing files that changed from the base of the PR and between e4e4d24 and 7633933.

⛔ Files ignored due to path filters (1)
  • database/tests/e2e/workers/harness/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • database/README.md
  • database/tests/e2e/workers/harness/src/test.ts
  • storage/README.md

📝 Walkthrough

Walkthrough

Three documentation and test examples update from the legacy call(...) RPC helper to the new registerWorker + iii.trigger(...) pattern. The database README quickstart, database test harness, and storage README quickstart all now initialize an SDK worker client and invoke database and storage functions consistently through the updated API.

Changes

SDK Client Registration Pattern Migration

Layer / File(s) Summary
Database examples (quickstart and test harness)
database/README.md, database/tests/e2e/workers/harness/src/test.ts
Database quickstart and test harness both transition to registerWorker initialization (using process.env.III_URL with localhost websocket default) and invoke database::execute for table creation and inserts, then database::query for row retrieval via iii.trigger(...), preserving SQL payloads and destructuring { rows }.
Storage quickstart example
storage/README.md
Storage README quickstart adopts the same registerWorker + iii.trigger(...) pattern for storage::putObject, storage::presignUrl (returning url and expires_at), storage::getObject, and storage::deleteObject, retaining bucket/key structure, body_base64 size guidance, and a trailing note on delete idempotency.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 The old call helper bids farewell with grace,
Now registerWorker sets a newer pace!
With iii.trigger dancing through the night,
Database and storage shine so bright! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is truncated and incomplete, showing 'refactor(database): update README and tests to use registerWorker and…' which does not fully convey the scope of changes beyond the database module. Complete the title to clearly indicate all affected modules (database and storage) or ensure the title accurately represents the primary changes being made across the codebase.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/readme-code-examples

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 and usage tips.

@sergiofilhowz sergiofilhowz merged commit cc353e5 into main May 21, 2026
15 of 16 checks passed
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