-
Notifications
You must be signed in to change notification settings - Fork 176
feat: Subqueries in SELECT for hierarchical data (includes) #1294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kevin-dp
wants to merge
19
commits into
main
Choose a base branch
from
kevin/includes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,851
−25
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
45f1065
Add support for subqueries in select
kevin-dp 2467505
Unit tests for includes
kevin-dp e702f80
Unit tests for ordered subqueries
kevin-dp f592b81
Add support for ordered subquery
kevin-dp 697502c
Unit tests for subqueries with limit
kevin-dp 1c2728c
Support LIMIT and OFFSET in subqueries
kevin-dp 16ac62b
ci: apply automated fixes
autofix-ci[bot] d117fea
Add changeset for includes subqueries
kevin-dp e210f23
Use reverse index for parent lookup in includes
kevin-dp 54830d4
ci: apply automated fixes
autofix-ci[bot] d324941
Unit tests for changes to deeply nested collections
kevin-dp f809526
Move fro top-down to bottom-up approach for flushing changes to neste…
kevin-dp 15b9862
ci: apply automated fixes
autofix-ci[bot] ec21dbf
Prefix child collection names to avoid clashes
kevin-dp 3d74cf5
Properly serialize correlation key before using it in collection ID
kevin-dp f590917
Additional test as suggested by Codex review
kevin-dp 3ea52ef
Unit test to ensure that correlation field does not need to be in the…
kevin-dp 3ca70b9
Stamp __includesCorrelationKeys on the result before output, and flus…
kevin-dp fc269d5
ci: apply automated fixes
autofix-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@tanstack/db': minor | ||
| --- | ||
|
|
||
| feat: support for subqueries for including hierarchical data in live queries |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is finding the first expression that references both sides, this is correct. We should consider what something like this does:
I suspect it breaks at the moment, and so we may want to throw if there is more than one expression matching both sources.
I think it's possible to make this work though by pulling the parent project value temporarily into the child issue pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it breaks right now because the parent row is not in the child pipeline. I added support for this in this PR: #1307