Skip to content

Commit

Permalink
Update examples for reverse_order/1 to correctly refer to `order_by…
Browse files Browse the repository at this point in the history
…/1` instead of `order/1` (#4507)
  • Loading branch information
rmoorman authored Sep 9, 2024
1 parent 89ad902 commit 4e3db57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ecto/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,7 @@ defmodule Ecto.Query do
## Examples
query |> reverse_order() |> Repo.one()
Post |> order(asc: :id) |> reverse_order() == Post |> order(desc: :id)
Post |> order_by(asc: :id) |> reverse_order() == Post |> order_by(desc: :id)
"""
def reverse_order(%Ecto.Query{} = query) do
update_in(query.order_bys, fn
Expand Down

0 comments on commit 4e3db57

Please sign in to comment.