You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query=from(minsubquery(sub),where: notm.deleted,select: m)
Repo.one(query)
end
...
However I'm not sure behaviours are needed for the append only example.
From my understanding it makes sense to use behaviours when multiple modules need to provide the same functions but with a different logic of implemention. In our example only the AppendOnlyLog module is implementing the behaviours.
For a learning purpose it makes sense to see how behaviours works 👍 but I'm not sure if they provide a lot of values for this repository?
Should we still keep them to demonstrate how they can be used?
The example is using behaviours to define the structure of the API interface:
phoenix-ecto-append-only-log-example/lib/append/append_only_log.ex
Lines 9 to 14 in e8eee00
The implementation of the API is then done in the
before_compile
macro:phoenix-ecto-append-only-log-example/lib/append/append_only_log.ex
Lines 25 to 48 in e8eee00
...
However I'm not sure behaviours are needed for the append only example.
From my understanding it makes sense to use behaviours when multiple modules need to provide the same functions but with a different logic of implemention. In our example only the
AppendOnlyLog
module is implementing the behaviours.For a learning purpose it makes sense to see how behaviours works 👍 but I'm not sure if they provide a lot of values for this repository?
Should we still keep them to demonstrate how they can be used?
ref: https://elixir-lang.org/getting-started/typespecs-and-behaviours.html#behaviours
The text was updated successfully, but these errors were encountered: