Alembic v3.2.1 Alembic.ToEctoSchema behaviour
The Alembic.ToEctoSchema behaviour converts a struct in the Alembic namespace to
an Ecto.Schema.t struct.
Summary
Types
nilif an empty singletonstruct- if a non-empty singleton[]- if an empty collection[struct]- if a non-empty collection
A module that defines __struct__/0 and __schema__(:fields) as happens when use Ecto.Schema is run in a module
Maps JSON API Alembic.Resource.type to ecto_schema_module for casting that
Alembic.Resource.type
Types
nilif an empty singletonstruct- if a non-empty singleton[]- if an empty collection[struct]- if a non-empty collection
A module that defines __struct__/0 and __schema__(:fields) as happens when use Ecto.Schema is run in a module.
ecto_schema_module_by_type()
ecto_schema_module_by_type() :: %{optional(Alembic.Resource.type) => ecto_schema_module}
Maps JSON API Alembic.Resource.type to ecto_schema_module for casting that
Alembic.Resource.type.
Functions
to_ecto_schema(params, ecto_schema_module)
to_ecto_schema(Alembic.ToParams.params, ecto_schema_module) :: struct
to_ecto_schema(map, params, ecto_schema_module_by_type)
to_ecto_schema(%{type: Alembic.Resource.type}, Alembic.ToParams.params, ecto_schema_module_by_type) :: struct
Callbacks
to_ecto_schema(struct, arg1, ecto_schema_module_by_type)
to_ecto_schema(struct, Alembic.ToParams.resource_by_id_by_type, ecto_schema_module_by_type) :: ecto_schema
Parameters
struct- anAlembic.Document.thierarchy structattributes_by_id_by_type- Maps a resource identifier’sAlembic.ResourceIdentifier.typeandAlembic.ResourceIdentifier.idto itsAlembic.Resource.attributesfromAlembic.Document.tincluded.ecto_schema_module_by_type-
Returns
nilif an empty singletonstruct- if a non-empty singleton[]- if an empty collection[struct]- if a non-empty collection