Don't pipe in one function only
This commit is contained in:
@@ -68,7 +68,7 @@ defmodule MusicLibrary.Collection do
|
|||||||
where: fragment("records.purchased_at IS NOT NULL"),
|
where: fragment("records.purchased_at IS NOT NULL"),
|
||||||
select: %{record_id: fragment("records.id"), release_id: r.value}
|
select: %{record_id: fragment("records.id"), release_id: r.value}
|
||||||
|
|
||||||
q |> Repo.all()
|
Repo.all(q)
|
||||||
end
|
end
|
||||||
|
|
||||||
def count_records_by_genre do
|
def count_records_by_genre do
|
||||||
@@ -78,7 +78,7 @@ defmodule MusicLibrary.Collection do
|
|||||||
order_by: [desc: count(r.value)],
|
order_by: [desc: count(r.value)],
|
||||||
select: %{genre: r.value, count: count(r.value)}
|
select: %{genre: r.value, count: count(r.value)}
|
||||||
|
|
||||||
q |> Repo.all()
|
Repo.all(q)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp base_search do
|
defp base_search do
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ defmodule MusicLibrary.Wishlist do
|
|||||||
where: fragment("records.purchased_at IS NULL"),
|
where: fragment("records.purchased_at IS NULL"),
|
||||||
select: %{record_id: fragment("records.id"), release_id: r.value}
|
select: %{record_id: fragment("records.id"), release_id: r.value}
|
||||||
|
|
||||||
q |> Repo.all()
|
Repo.all(q)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp base_search do
|
defp base_search do
|
||||||
|
|||||||
Reference in New Issue
Block a user