From 6575703c2b5d1c5f7d704f333b493a9c025432e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Pr=C3=A1?= Date: Mon, 14 Sep 2020 12:32:39 -0300 Subject: [PATCH] Add new examples to Query.list --- lib/crudry_query.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/crudry_query.ex b/lib/crudry_query.ex index d55b0e5..fcc2c52 100644 --- a/lib/crudry_query.ex +++ b/lib/crudry_query.ex @@ -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