Ecto v0.4.0

Modules summary

Ecto

Ecto is split into 3 main components:

Ecto.Adapter

This module specifies the adapter API that an adapter is required to implement

Ecto.Adapter.Migrations

Specifies the adapter migrations API

Ecto.Adapter.Storage

Specifies the adapter storage API

Ecto.Adapter.TestTransactions

Specifies the adapter test transactions API

Ecto.Adapter.Transactions

Specifies the adapter transactions API

Ecto.Adapters.Postgres

This is the adapter module for PostgreSQL. It handles and pools the connections to the postgres database with poolboy

Ecto.Associations

Documents the functions required for associations to implement in order to work with Ecto query mechanism

Ecto.Associations.BelongsTo

The association struct for a belongs_to association

Ecto.Associations.Has

The association struct for has_one and has_many associations

Ecto.Associations.NotLoaded

Struct returned by one to one associations when there are not loaded

Ecto.Date
Ecto.DateTime
Ecto.Migration
Ecto.Migrator

This module provides the migration API

Ecto.Model

Models are Elixir modules with Ecto-specific behaviour

Ecto.Model.Callbacks

Define module-level callbacks in models

Ecto.Model.Schema

Defines a schema for a model

Ecto.Model.Validations

Conveniences for defining module-level validations in models

Ecto.Query

Provides the Query DSL

Ecto.Repo

Defines a repository

Ecto.Storage

Convenience functions around the data store of a repository

Ecto.Time
Ecto.Utils
Ecto.Validator

Validates a given struct or dict given a set of predicates

Ecto.Validator.Predicates

A handful of predicates to be used in validations

Mix.Tasks.Ecto.Create

Create the database for the given repository, as specified in the repo's url

Mix.Tasks.Ecto.Drop

Drop the database for the given repository, as specified in the repo's url

Mix.Tasks.Ecto.Gen.Migration

Generates a migration for the given repository

Mix.Tasks.Ecto.Gen.Repo

Generates a new repository

Mix.Tasks.Ecto.Migrate

Runs the pending migrations for the given repository

Mix.Tasks.Ecto.Rollback

Reverts applied migrations in the given repository

Exceptions summary

Ecto.AssociationNotLoadedError
Ecto.CastError

Raised at runtime when a value cannot be cast

Ecto.InvalidModelError
Ecto.InvalidURLError
Ecto.MigrationError
Ecto.MultipleResultsError
Ecto.NoPrimaryKeyError
Ecto.NoResultsError
Ecto.Query.CompileError

Raised at compilation time when the query cannot be compiled

Ecto.QueryError

Raised at runtime when the query is invalid

Protocols summary

Ecto.Queryable

Converts a data structure into an Ecto.Query struct