Skip to content

Add small clarification to Ecto.Query docs - #4051

Merged
josevalim merged 1 commit into
elixir-ecto:masterfrom
Sleepful:fork
Nov 17, 2022
Merged

Add small clarification to Ecto.Query docs#4051
josevalim merged 1 commit into
elixir-ecto:masterfrom
Sleepful:fork

Conversation

@Sleepful

Copy link
Copy Markdown
Contributor

This makes sense to me, not sure if this makes sense to other people. LMK if this makes sense.

Motivation

I was trying to find out if Ecto.Query functions would query the DB. Some examples call Repo functions so they imply that Repo must be used but it isn't too explicit. For instance Ecto.Query.preload/3 has this description:

Preloads the associations into the result set.

which sounds a lot like Ecto.Repo.preload/3

Preloads the associations into the result set.

Ecto.Repo.preload/3 also includes this bit, which makes sense but not while doubting whether Query.preload will fetch or not.

This is similar to Ecto.Query.preload/3 except it allows you to preload structs after they have been fetched from the database.

@josevalim
josevalim merged commit d757938 into elixir-ecto:master Nov 17, 2022
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

greg-rychlewski pushed a commit to greg-rychlewski/ecto that referenced this pull request Dec 19, 2022
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.

2 participants