Open gjaldon opened 5 years ago
How it's going to work? If I remember correctly composite types have fixed number of attributes, right?
Did you mean: {:unused, nil} | {:next, id} | {:finished, nil}
? If so then I believe that it should not be implemented in such library. In same way you would require all ecto types have such support which does not makes sense especially if we are talking about complex combinations.
The better way is to create your own ecto type instead. Remember that you can reuse existing ecto callback implementations when defining your own cast, dump and load functions.
It would be nice to be able to express in Ecto a datatype like: