Money.Ecto.Composite.Type (Money v1.4.3) View Source

Implements the Ecto.Type behaviour for a user-defined Postgres composite type called :money_with_currency.

This is the preferred option for Postgres database since the serialized money amount is stored as a decimal number,

Link to this section Summary

Link to this section Functions

Link to this function

cast(money, params \\ [])

View Source

Callback implementation for Ecto.ParameterizedType.cast/2.

Link to this function

dump(money, dumper \\ nil, params \\ [])

View Source

Callback implementation for Ecto.ParameterizedType.dump/3.

Callback implementation for Ecto.ParameterizedType.embed_as/2.

Link to this function

equal?(term1, term2, params)

View Source

Callback implementation for Ecto.ParameterizedType.equal?/3.

Callback implementation for Ecto.ParameterizedType.init/1.

Link to this function

load(tuple, loader \\ nil, params \\ [])

View Source

Callback implementation for Ecto.ParameterizedType.load/3.

Callback implementation for Ecto.ParameterizedType.type/1.