I wouldn't like other people to make the same mistake I did, so if no warning can be implemented easily in the parameter "options" of all ecto functions, that checks if the options exists,i would like to suggest to deprecate "Repo.get_by" and the use of clauses attending to the following reasons:
- it breaks the consistency of usage: if all goes with queryable, why use clauses?
- get_by only exist for one result, there is not a get_by for multiple results, so it appears to be partially implemented.
- it seems that clauses was an attempt to reduce the quantity of keystrokes needed to make queries to database.
I come from django where its orm is quite fast to write queries to database. For example, to do a join, you just need to put "
table1__table2.id = id". In ecto you must write the join query in a longer way. That's why i liked get_by with clauses, because i wrote less, but i will not use it anymore for the reasons above.