Skip to content

Commit

Permalink
Add new examples to Query.list
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielpra1 committed Sep 14, 2020
1 parent aaa6323 commit 6575703
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/crudry_query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ defmodule Crudry.Query do
Crudry.Query.list(MySchema, [limit: 10, offset: 3, sorting_order: :desc, order_by: :value])
Crudry.Query.list(MySchema, %{order_by: "value"})
Crudry.Query.list(MySchema, %{order_by: :value})
Crudry.Query.list(MySchema, %{order_by: ["age", "username"]})
Crudry.Query.list(MySchema, %{order_by: [:age, :username]})
Crudry.Query.list(MySchema, %{order_by: [asc: :age, desc: :username]})
Crudry.Query.list(MySchema, custom_query: &MySchema.scope_list/1)
"""
def list(initial_query, opts \\ []) do
Expand Down

0 comments on commit 6575703

Please sign in to comment.