fix: Support boolean column filters in where() and having()#1304
Merged
kevin-dp merged 5 commits intoTanStack:mainfrom Feb 26, 2026
Merged
fix: Support boolean column filters in where() and having()#1304kevin-dp merged 5 commits intoTanStack:mainfrom
kevin-dp merged 5 commits intoTanStack:mainfrom
Conversation
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-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: |
b14bbeb to
9cd9339
Compare
🦋 Changeset detectedLatest commit: d8ea072 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 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 |
Convert ref proxies to PropRef expressions before the isExpressionLike
validation, allowing idiomatic boolean filters like
`.where(({ u }) => u.active)` and `.having(({ s }) => s.isActive)`.
Closes TanStack#1303
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
Merged
kevin-dp
added a commit
that referenced
this pull request
Feb 26, 2026
…risons Replace eq(x, false) with not(x) and eq(x, true) with bare boolean refs in query examples, aligning docs with the idiomatic API supported by #1304. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
KyleAMathews
pushed a commit
that referenced
this pull request
Feb 26, 2026
docs: Use idiomatic boolean filters instead of eq() for boolean comparisons Replace eq(x, false) with not(x) and eq(x, true) with bare boolean refs in query examples, aligning docs with the idiomatic API supported by #1304. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🎉 This PR has been released! Thank you for your contribution! |
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.
Summary
PropRefexpressions inwhere()andhaving()before theisExpressionLikevalidation, enabling idiomatic boolean filters:.where(({ u }) => u.active)instead of.where(({ u }) => eq(u.active, true)).where(({ u }) => not(u.active))instead of.where(({ u }) => eq(u.active, false)).having(({ $selected }) => $selected.isHighVolume)for computed boolean fieldswhereandhavingclausesTest plan
bare boolean column reference as where filter— filters to active employeesnegated boolean column reference as where filter— filters to inactive employeeshaving with bare boolean selected field— filters grouped results by computed booleanhaving with negated boolean selected field— filters grouped results by negated booleanCloses #1303
🤖 Generated with Claude Code