Remove unused functions
This commit is contained in:
@@ -6,20 +6,6 @@ defmodule MusicLibrary.Records do
|
||||
|
||||
@fields [:id, :type, :artists, :format, :title, :release, :genres, :musicbrainz_id, :cover_hash]
|
||||
|
||||
def list_records(opts \\ []) do
|
||||
limit = Keyword.get(opts, :limit, 20)
|
||||
offset = Keyword.get(opts, :offset, 0)
|
||||
|
||||
q =
|
||||
from r in Record,
|
||||
order_by: [r.artists[0]["sort_name"], r.title],
|
||||
limit: ^limit,
|
||||
offset: ^offset,
|
||||
select: ^@fields
|
||||
|
||||
Repo.all(q)
|
||||
end
|
||||
|
||||
def search_records(query, opts \\ []) do
|
||||
limit = Keyword.get(opts, :limit, 20)
|
||||
offset = Keyword.get(opts, :offset, 0)
|
||||
@@ -73,10 +59,6 @@ defmodule MusicLibrary.Records do
|
||||
end)
|
||||
end
|
||||
|
||||
def count_records do
|
||||
Repo.aggregate(Record, :count)
|
||||
end
|
||||
|
||||
def count_records_by_format do
|
||||
q =
|
||||
from r in Record,
|
||||
|
||||
Reference in New Issue
Block a user