ex_audit
ex_audit copied to clipboard
Add repo.latest function to only get most recent Version
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.
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.