-
Notifications
You must be signed in to change notification settings - Fork 99
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
Support limit queries with Dataloader.Ecto #93
Support limit queries with Dataloader.Ecto #93
Commits on Jun 20, 2020
-
Load rows for limit/offset queries with lateral join
Queries that do not rely on limit/offset continue to use the existing approach, where a simple where clause is added to the query. Complex queries are converted into a lateral subquery. The outer query contains the inputs. Ideally the query would use `unnest` or a similar function to efficiently load an array of values into a query, but Ecto doesn't offer such functionality in a portable way. The workaround here is to run a distinct query that selects the column from the queryable where the value is any of the inputs.
Configuration menu - View commit details
-
Copy full SHA for 7403234 - Browse repository at this point
Copy the full SHA 7403234View commit details
Commits on Jun 23, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9f62347 - Browse repository at this point
Copy the full SHA 9f62347View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bd12da - Browse repository at this point
Copy the full SHA 8bd12daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b6daf3 - Browse repository at this point
Copy the full SHA 1b6daf3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8aa9276 - Browse repository at this point
Copy the full SHA 8aa9276View commit details -
Fix User -> Score relationship to be via post, not leaderboard
When associating via leaderboard, all users are associated with all scores. It makes for a better test to only see that users scores.
Configuration menu - View commit details
-
Copy full SHA for f87ad4d - Browse repository at this point
Copy the full SHA f87ad4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac82f0c - Browse repository at this point
Copy the full SHA ac82f0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e8b2c1 - Browse repository at this point
Copy the full SHA 6e8b2c1View commit details
Commits on Jun 27, 2020
-
Fix duplicate records from lateral preload
This can happen when there is a through association like A -has many-> B -belongs to-> C When loading the A -> C association using a join, duplicate entries for C were being returned. The fix is to throw a distinct() on the inner query. There may be a more elegant approach to detecting when the distinct is necessary, but at least the results are correct now.
Configuration menu - View commit details
-
Copy full SHA for f21029e - Browse repository at this point
Copy the full SHA f21029eView commit details -
Only distinct lateral preload when required
When A HasMany B and B BelongsTo C, then A can have the same C multiple times. A ManyToMany association is similar.
Configuration menu - View commit details
-
Copy full SHA for 7710588 - Browse repository at this point
Copy the full SHA 7710588View commit details
Commits on Jun 28, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 9bd760d - Browse repository at this point
Copy the full SHA 9bd760dView commit details -
Add support for loading assoc when user query contains limits and joins
This unfortunately required a significant duplication of the build_preload_query code. When the users query contains joins, the first join from the users query to an association must target the first source in the query, not the last one.
Configuration menu - View commit details
-
Copy full SHA for 6cd72f2 - Browse repository at this point
Copy the full SHA 6cd72f2View commit details
Commits on Jul 2, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 55bfed4 - Browse repository at this point
Copy the full SHA 55bfed4View commit details