ex_audit icon indicating copy to clipboard operation
ex_audit copied to clipboard

Add repo.latest function to only get most recent Version

Open yukster opened this issue 4 years ago • 1 comments

While integrating with ExAudit I found that I kept calling Repo.history and piping it into List.first or hd(). In fact the only place ever actually looked at more than the most recent was in a test. So I added the included Repo.lastest function to just get the latest Version record for the given Schema struct.

yukster avatar May 29 '20 18:05 yukster

Hey @yukster! Thanks for the PR. I'd rather support the history_query approach I discussed in #64, since that would be more powerful and keeps the API lean.

narrowtux avatar Mar 10 '21 09:03 narrowtux