Ecto v2.2.11 API Reference
Modules
Ecto is split into 4 main components
This module specifies the adapter API that an adapter is required to implement
Specifies the adapter migrations API
Specifies the adapter storage API
Specifies the adapter structure API
Specifies the adapter transactions API
Adapter module for MySQL
Adapter module for PostgreSQL
Behaviour and implementation for SQL adapters
Specifies the behaviour to be implemented by all SQL connections
A pool for concurrent transactional tests
The association struct for a belongs_to
association
The association struct for has_one
and has_many
associations
The association struct for has_one
and has_many
through associations
The association struct for many_to_many
associations
Struct returned by one to one associations when they are not loaded
Changesets allow filtering, casting, validation and definition of constraints when manipulating structs
Casts and dumps a given struct into an Ecto type
A deprecated Ecto type for dates
A deprecated Ecto type that includes a date and a time
Struct used for logging entries
Migrations are used to modify your database schema over time
Used internally by adapters
Used internally by adapters
Used internally by adapters
Used internally by adapters
Used internally by adapters
This module provides the migration API
Ecto.Multi
is a data structure for grouping multiple Repo operations
Provides the Query DSL
This module lists all functions allowed in the query API
Converts a data structure into an Ecto.Query
Defines a repository
Defines a schema
Stores metadata of a struct
Stores subquery information
A deprecated Ecto type for time
An Ecto type for UUIDs strings
Exceptions
Raised when a changeset can’t cast a value
Raised when we cannot perform an action because the changeset is invalid
Raised at runtime when an operation that requires a primary key is invoked
with a schema that does not define a primary key by using @primary_key false
Raised at runtime when an operation that requires a primary key is invoked with a schema missing value for its primary key
Raised at runtime when a value cannot be cast
Raised at compilation time when the query cannot be compiled
Raised at runtime when the query is invalid
Raised at runtime when a subquery is invalid
Mix Tasks
Prints Ecto tasks and their information
Create the storage for the given repository
Drop the storage for the given repository
Dumps the current environment’s database structure for the given repository into a structure file
Generates a migration
Generates a new repository
Loads the current environment’s database structure for the given repository from a previously dumped structure file
Runs the pending migrations for the given repository
Displays the up / down migration status for the given repository
Reverts applied migrations in the given repository