Type mapping between the Caravela DSL, Ecto, and Postgres.
The DSL uses plain atoms like :string, :integer, :decimal, :text.
Those are translated into Ecto field types (for schema generation) and
Postgres column types (for migration generation).
Summary
Types
A DSL type atom recognised by Caravela.
Functions
Ecto type for a DSL atom. Raises if unknown.
Is the atom a known DSL type?
All DSL types recognised by Caravela.
True for numeric DSL types.
Postgres column type for a DSL atom. Raises if unknown.
True for string-ish DSL types.
Types
@type dsl_type() :: atom()
A DSL type atom recognised by Caravela.
Functions
Ecto type for a DSL atom. Raises if unknown.
Is the atom a known DSL type?
@spec known_types() :: [dsl_type()]
All DSL types recognised by Caravela.
True for numeric DSL types.
Postgres column type for a DSL atom. Raises if unknown.
True for string-ish DSL types.