Skip to content
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

Avoid preloads in lateral subqueries #98

Merged

Conversation

mbuhot
Copy link
Contributor

@mbuhot mbuhot commented Aug 27, 2020

Relates to #97

Ecto doesn't allow preloads in subqueries, so this PR moves any preloads out to a call to Repo.preload.
This should support basic keyword preloads, but join preloads are dropped.

It also avoids using a lateral join when loading rows by primary key with a limit, as in the example in #97.

Ecto doesn't allow preloads in subqueries
This change moves the preloads out to a call to Repo.preload.

This should support basic keyword preloads, but join preloads are dropped.
@tlvenn
Copy link
Member

tlvenn commented Nov 5, 2020

Would be super helpful to merge this @benwilson512 when you get the chance to review it.
Thanks a lot @mbuhot for the PR !

@benwilson512
Copy link
Contributor

Great stuff, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants