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

Questions on approach taken

Open
#8 8 comments 1 reaction 1 assignee Assigned to @Danwhy View on GitHub
help wanted question technical
Dominant language
Elixir
Stars
82
Forks
5
PR merge metrics
No merged PRs in 30d

Description

- 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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.