Ecto.Repo.all

You're seeing just the callback all, go back to Ecto.Repo module for more information.
Link to this callback

all(queryable, opts)

View Source (optional)

Specs

all(queryable :: Ecto.Queryable.t(), opts :: Keyword.t()) :: [Ecto.Schema.t()]

Fetches all entries from the data store matching the given query.

May raise Ecto.QueryError if query validation fails.

Options

  • :prefix - The prefix to run the query on (such as the schema path in Postgres or the database in MySQL). This will be applied to all from and joins in the query that did not have a prefix previously given either via the :prefix option on join/from or via @schema_prefix in the schema. For more information see the "Query Prefix" section of the Ecto.Query documentation.

See the "Shared options" section at the module documentation for more options.

Example

# Fetch all post titles
query = from p in Post,
     select: p.title
MyRepo.all(query)