Box.Fraction.EctoType (box v0.15.1)
View SourceEcto type for Fraction. The Fraction type is expected to
be stored as a fraction
type which is a composite Postgres
type.
Summary
Functions
Callback implementation for Ecto.Type.cast/1
.
Callback implementation for Ecto.Type.dump/1
.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
Callback implementation for Ecto.Type.load/1
.
Callback implementation for Ecto.Type.type/0
.
Functions
@spec cast(Box.Fraction.t() | {integer(), integer()} | {String.t(), String.t()}) :: :error | {:ok, Box.Fraction.t()}
Callback implementation for Ecto.Type.cast/1
.
Callback implementation for Ecto.Type.dump/1
.
Callback implementation for Ecto.Type.embed_as/1
.
Callback implementation for Ecto.Type.equal?/2
.
@spec load({integer(), integer()}) :: {:ok, Box.Fraction.t()}
Callback implementation for Ecto.Type.load/1
.
@spec type() :: :fraction
Callback implementation for Ecto.Type.type/0
.