Conversation
🦋 Changeset detectedLatest commit: 13d9d0d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
…itional return types
8648213 to
24fccb5
Compare
samwillis
commented
Sep 11, 2025
Contributor
|
Size Change: 0 B Total Size: 68.4 kB ℹ️ View Unchanged
|
Contributor
|
Size Change: 0 B Total Size: 1.18 kB ℹ️ View Unchanged
|
KyleAMathews
approved these changes
Sep 11, 2025
Collaborator
KyleAMathews
left a comment
There was a problem hiding this comment.
Generally looks great!
| if (result === undefined || result === null) { | ||
| // Callback returned undefined/null - disabled query | ||
| collectionRef.current = null | ||
| } else if (result instanceof CollectionImpl) { |
Collaborator
There was a problem hiding this comment.
it'd be nice to have a isCollection
Collaborator
Author
There was a problem hiding this comment.
I've left isCollection and isQueryBuilder for a followup, there is some ambiguity on when each should be set as everything becomes a collection at the end.
| // Callback returned a Collection instance - use it directly | ||
| result.startSyncImmediate() | ||
| collectionRef.current = result | ||
| } else if (result instanceof BaseQueryBuilder) { |
Merged
KyleAMathews
pushed a commit
that referenced
this pull request
Oct 20, 2025
Add comprehensive documentation for three undocumented live query features: 1. Conditional queries via undefined/null return - Document how to disable queries by returning undefined/null from useLiveQuery - Explain the disabled state (status: 'disabled', isEnabled: false) - Show practical "wait until inputs exist" pattern 2. Alternative useLiveQuery callback return types - Document returning pre-created Collections - Document returning LiveQueryCollectionConfig objects - Show use cases for each approach 3. isUndefined and isNull query functions - Add to Expression Functions Reference - Explain semantic difference between undefined vs null - Show examples with joins and optional properties These features were added in PR #535 and DB 0.2.0 but were not previously documented in the Live Queries guide. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
KyleAMathews
added a commit
that referenced
this pull request
Oct 20, 2025
…695) Add comprehensive documentation for three undocumented live query features: 1. Conditional queries via undefined/null return - Document how to disable queries by returning undefined/null from useLiveQuery - Explain the disabled state (status: 'disabled', isEnabled: false) - Show practical "wait until inputs exist" pattern 2. Alternative useLiveQuery callback return types - Document returning pre-created Collections - Document returning LiveQueryCollectionConfig objects - Show use cases for each approach 3. isUndefined and isNull query functions - Add to Expression Functions Reference - Explain semantic difference between undefined vs null - Show examples with joins and optional properties These features were added in PR #535 and DB 0.2.0 but were not previously documented in the Live Queries guide. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.