Other than defining a method in the application model module (that accepts the model as a parameter), is it possible to define a computed field in an ecto schema or model?
For example, say we have a field ‘title’ (Mr., Mrs., Dr. etc.) and a field ‘name’, and we’d like a display field ‘display_name’ - which includes the concatenated ‘title’ (if present), with ‘name’. (e.g. Dr. James Gordon).
The concatenated field should also be lazy evaluated, so that there is no impact on Repo.all(model).