docs(db): clarify caseWhen, coalesce, manual transactions, and multi-endpoint behavior#1544
docs(db): clarify caseWhen, coalesce, manual transactions, and multi-endpoint behavior#1544KyleAMathews wants to merge 3 commits into
Conversation
…endpoint behavior Address documentation feedback: add caseWhen operator docs, clarify coalesce handles null/undefined, document manual transaction handler bypass semantics, and warn about multi-endpoint Query Collection pitfalls. Fix categorization of utility functions and reference index ordering. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR updates documentation across user guides, API references, and skill files to clarify TanStack DB behavior: introducing ChangesDocumentation Clarifications
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: 0 B Total Size: 122 kB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 4.24 kB ℹ️ View Unchanged
|
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Summary
Addresses documentation feedback by clarifying several areas where users were confused or the docs were incomplete:
caseWhenoperator with examples and usage guidancecoalescehandles bothnullandundefined(not justnull)onInsert/onUpdate/onDeletehandlers, with a draft-style workflow exampleApproach
These changes address real confusion points reported via feedback. Each addition follows the existing doc patterns: prose explanation followed by code examples showing WRONG vs CORRECT usage where applicable.
Key decisions:
coalesceandcaseWhen(previously both were under "Mathematical Functions")coalesce/caseWhenas utility functions rather than string functions — important since LLMs read frontmatter for relevanceoperators.mdsource link to prevent future rotcaseWhenalphabetical ordering in the reference indexNon-goals:
docs/reference/functions/caseWhen.mdfile (separate concern)Files changed
docs/collections/query-collection.mddocs/guides/live-queries.mdcoalesceexamples,caseWhendocs, new "Utility Functions" headingdocs/guides/mutations.mddocs/reference/index.mdcaseWhenin correct alphabetical positiondocs/reference/variables/operators.mdcaseWhento operators list, removed stale line anchorpackages/db/skills/db-core/live-queries/SKILL.mdpackages/db/skills/db-core/mutations-optimistic/SKILL.mdVerification
These are documentation-only changes with no runtime impact.
# Verify docs build pnpm docs:build🤖 Generated with Claude Code
Summary by CodeRabbit