Search
Ecto.Type for User-Defined Types (UDTs).
Ecto.Type
options
:type (atom/0) - Required. The UDT.
:type
atom/0
:encoded_fields (list of atom/0) - JSON encoded fields.
:encoded_fields
examples
For example, if you have defined an email UDT in your database, you can use it in your schema like this:
email
schema "users" do field :email, Exandra.UDT, type: :email end