ecto_list v0.1.1 EctoList.Context View Source

Implements conveniences to manipulate the items order list.

You can implement all the functions available in this module by using this module inside of the context of the List module. (Check the guides to see how)

There are two functions in this module: sync_order_list/1 and reset_order_list/1

They both take a List struct that you define when calling "use".

sync_order_list/1 : will add missing ids to the items order list of the list.

reset_order_list/1 : will set the items order as the list of ids ordered by inserted date.