Ecto.Schema.Metadata — Ecto v3.12.5 (original) (raw)

Stores metadata of a struct.

State

The state of the schema is stored in the :state field and allows following values:

Source

The :source tracks the (table or collection) where the struct is or should be persisted to.

Prefix

Tracks the source prefix in the data storage.

Context

The :context field represents additional state some databases require for proper updates of data. It is not used by the built-in adapters ofEcto.Adapters.Postgres and Ecto.Adapters.MySQL.

Schema

The :schema field refers the module name for the schema this metadata belongs to.

Summary

Types

@type state() :: :built | :loaded | :deleted