Skip to content

Commit 8e777f6

Browse files
committed
Clean up
1 parent e60211f commit 8e777f6

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Diff for: lib/ecto/repo/preloader.ex

-7
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,10 @@ defmodule Ecto.Repo.Preloader do
3939
end
4040

4141
def preload(structs, repo_name, preloads, opts) when is_list(structs) do
42-
# IO.inspect([preloads: preloads, opts: opts], label: :preload__list)
4342
normalize_and_preload_each(structs, repo_name, preloads, opts[:take], opts)
4443
end
4544

4645
def preload(struct, repo_name, preloads, opts) when is_map(struct) do
47-
# IO.inspect([preloads: preloads, opts: opts], label: :preload__map)
4846
normalize_and_preload_each([struct], repo_name, preloads, opts[:take], opts) |> hd()
4947
end
5048

@@ -110,7 +108,6 @@ defmodule Ecto.Repo.Preloader do
110108
[
111109
fn opts ->
112110
fetch_query(fetch_ids, assoc, repo_name, query, prefix, related_key, take, opts)
113-
# |> IO.inspect(label: :fetch_query)
114111
end
115112
| queries
116113
]
@@ -193,7 +190,6 @@ defmodule Ecto.Repo.Preloader do
193190
"""
194191
end
195192

196-
binding() |> Keyword.take(~w/ids loaded? struct value field owner_key card/a) |> IO.inspect(label: :fetch_ids)
197193
cond do
198194
card == :one and loaded? ->
199195
{fetch_ids, [ids | loaded_ids], [value | loaded_structs]}
@@ -208,7 +204,6 @@ defmodule Ecto.Repo.Preloader do
208204
end
209205

210206
defp fetch_query(ids, assoc, _repo_name, query, _prefix, related_key, _take, _opts) when is_function(query, 1) do
211-
binding() |> Keyword.take(~w(query ids related_key)a) |> IO.inspect(label: :fetch_query_first)
212207
# Note we use an explicit sort because we don't want
213208
# to reorder based on the struct. Only the ID.
214209
ids
@@ -228,7 +223,6 @@ defmodule Ecto.Repo.Preloader do
228223

229224
# Add the related key to the query results
230225
query = update_in query.select.expr, &{:{}, [], [fields, &1]}
231-
binding() |> Keyword.take(~w(fields query ids related_key take)a) |> IO.inspect(label: :fetch_query_second)
232226

233227
# If we are returning many results, we must sort by the key too
234228
query =
@@ -370,7 +364,6 @@ defmodule Ecto.Repo.Preloader do
370364

371365
defp load_assoc({:assoc, assoc, ids}, struct) do
372366
%{field: field, owner_key: owner_key, cardinality: cardinality} = assoc
373-
binding() |> Keyword.take(~w(struct ids owner_key)a) |> IO.inspect(label: :load_assoc)
374367
Enum.reduce owner_key, struct, fn owner_key_field, struct ->
375368
key = Map.fetch!(struct, owner_key_field)
376369

0 commit comments

Comments
 (0)