Ecto.ParameterizedType.init
You're seeing just the callback
init
, go back to Ecto.ParameterizedType module for more information.
Specs
Callback to convert the options specified in the field macro into parameters to be used in other callbacks.
This function is called at compile time, and should raise if invalid values are
specified. It is idiomatic that the parameters returned from this are a map.
field
and schema
will be injected into the options automatically.
For example, this schema specification
schema "my_table" do
field :my_field, MyParameterizedType, opt1: :foo, opt2: nil
end
will result in the call:
MyParameterizedType.init([schema: "my_table", field: :my_field, opt1: :foo, opt2: nil])