-
Notifications
You must be signed in to change notification settings - Fork 4
Any plans for Model.last and Query method? #3
Copy link
Copy link
Open
Description
Hi @meyercm , sorry for coming to complain again. Do you have any plans for generating a last method(order_by: [desc: :inserted_at]) for model, just like ActiveRecord#last. I personally find it very useful.
Another feature I found useful is generating a bunch of methods that returns a Ecto.Query. These methods could be bundled up in a generated Module, like Model.Query.query_method.
For example.
User.Query.where(username: "chris") would return a Query similar to from(User, where: [username: "chris"]). This would simplify lots of boilerplate code when composing query or when using preload.
Sorry for my poor English, I hope I've made myself clear.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels