feat: SelectFourMany with consolidate() for star topology#3054
Open
TonySchneider wants to merge 1 commit intoSeaQL:masterfrom
Open
feat: SelectFourMany with consolidate() for star topology#3054TonySchneider wants to merge 1 commit intoSeaQL:masterfrom
TonySchneider wants to merge 1 commit intoSeaQL:masterfrom
Conversation
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.
PR Info
New Features
SelectFourMany<E, F, G, H, TOP>mirroringSelectThreeManySelectFour::consolidate()returningSelectFourManySelectFourMany<TopologyStar>::all()returningVec<(E::Model, Vec<F::Model>, Vec<G::Model>, Vec<H::Model>)>consolidate_query_result_quad_starhelper (mirrorsconsolidate_query_result_tee)Bug Fixes
Breaking Changes
Changes
SelectFour::all()returns flat tuples(E, Option<F>, Option<G>, Option<H>)and there's noconsolidate()to roll has_many children up intoVecs the waySelectThreeManydoes. Hit this fetching a parent entity along with three of its has_many children in one query - ended up batching a separate fetch for the fourth entity, which feels off given the rest of the codebase usesconsolidate()consistently. This PR adds the equivalent forSelectFour, star topology only (E -> F, E -> G, E -> H); chain/tee variants can follow if needed. Reusesretain_unique_modelsandModelKeyso behavior matches the 3-way path. Unit tests cover single-row, sparse children, cross-product dedup, and multi-parent ordering.