Get Last Record From Ecto

From ElixirBlocks
Jump to: navigation, search
Repo.one(from x in MyApp.Model, order_by: [desc: x.id], limit: 1)


https://til.hashrocket.com/posts/388b0870c7-get-the-last-record-with-ecto