dwyl/phoenix-ecto-append-only-log-example

Questions on approach taken

オープン

#8 opened on 2018/10/09

 (8 件のコメント) (1 件のリアクション) (1 人の担当者)Elixir (5 件のフォーク)auto 404
help wantedquestiontechnical

Repository metrics

Stars
 (82 個のスター)
PR merge metrics
 (PR metrics pending)

説明

  • Why is everything done using macros? We could achieve the same result by making them regular functions which takes the relevant module as an argument. Is there any benefits of one approach vs the other?

  • Is the insert function just allowing the user to skip the step where they call the relevant changeset function? Is this a good idea?

    • When inserting into the database in this way will a user only ever need on changeset function? In a regular Phoenix application there may be multiple changesets depending on what needs to be inserted/updated in the database. If a user needs to change their password for example there could be a changeset that deals specifically with just this. (Just to be clear, I cannot actually think of a situation with this approach where a user might need more than one changeset function but thought it best to raise the point in case I have missed something)
  • The get and get_by functions seem to just call their Repo equivalents. Are they needed?

コントリビューターガイド