Skip to content

Commit

Permalink
Tiny added example for order_by (#4179)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanl authored May 5, 2023
1 parent e270c2e commit 10e1882
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ecto/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 1703,7 @@ defmodule Ecto.Query do
City |> order_by([c], asc: c.name, desc: c.population)
City |> order_by(asc: :name) # Sorts by the cities name
City |> order_by(^order_by_param) # Keyword list
"""
defmacro order_by(query, binding \\ [], expr) do
Expand Down

0 comments on commit 10e1882

Please sign in to comment.