Localize.UnitWithUsage.Ecto.Composite.Type (Localize SQL v1.0.0)

Copy Markdown View Source

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

This is the preferred option for Postgres databases since the serialized unit value is stored as a decimal number and the unit usage is preserved across the round trip.

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

blank?(_)

cast(unit)

Callback implementation for Ecto.Type.cast/1.

dump(unit)

Callback implementation for Ecto.Type.dump/1.

embed_as(_)

Callback implementation for Ecto.Type.embed_as/1.

equal?(term1, term2)

Callback implementation for Ecto.Type.equal?/2.

load(arg)

Callback implementation for Ecto.Type.load/1.

type()

Callback implementation for Ecto.Type.type/0.