Ecto.Type implementation for FastDecimal. Lets you use FastDecimal
as the value type for numeric / decimal columns.
defmodule MyApp.Invoice do
use Ecto.Schema
schema "invoices" do
field :total, FastDecimal.Ecto.Type
end
endThe database adapter (e.g. postgrex) speaks Decimal over the wire — this
type converts at the boundary so the database stays compatible while your
Elixir code holds %FastDecimal{} structs.