Helpers for introspecting Ecto schemas.
Summary
Functions
Get the association type for a field in a schema.
Get the foreign key for a has_many or has_one association.
Functions
@spec association_type(module(), atom()) :: :belongs_to | :has_many | :has_one | :many_to_many | nil
Get the association type for a field in a schema.
Returns:
:belongs_tofor belongs_to associations:has_manyfor has_many associations:has_onefor has_one associations:many_to_manyfor many_to_many associationsnilif the field is not an association
Get the foreign key for a has_many or has_one association.