Sorted performer and performance queries.
This commit is contained in:
@@ -21,6 +21,19 @@ defmodule Runosaari.Registration do
|
||||
Repo.all(Performer)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the list of performers.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> list_performers()
|
||||
[%Performer{}, ...]
|
||||
|
||||
"""
|
||||
def list_sorted_performers do
|
||||
Repo.all(Performer |> order_by(:seqnum))
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single performer.
|
||||
|
||||
|
||||
@@ -21,6 +21,19 @@ defmodule Runosaari.Schedule do
|
||||
Repo.all(Performance)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns the list of performances sorted by seqnum.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> list_sorted_performances()
|
||||
[%Performance{}, ...]
|
||||
|
||||
"""
|
||||
def list_sorted_performances do
|
||||
Repo.all(Performance |> order_by(:seqnum))
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single performance.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user