Wrapping Up: Creating and Using Custom Types
Review what we have learned about the creation and usage of custom types.
We'll cover the following
Custom types can add an extra layer of expressiveness to our Ecto projects. They allow us to use more complex types in our Elixir code than the more straightforward, universal types exposed by Ecto’s adapters. When we build on an existing Ecto type, it gives us many benefits with a small amount of code, so it’s worth considering as we’re planning out our projects.
To learn more, check out the documentation for the Ecto.Type module. You might also want to explore the Hex repository to look at some existing custom types.
Get hands-on with 1400+ tech skills courses.