Literature.Repo (literature v0.4.12)

Wrappers around Ecto.Repo callbacks.

These functions should be used when working with an Ecto repo. These functions will resolve the correct repo instance, and set the schema prefix and the log level, according to the Literature configuration.

Summary

Functions

all(queryable, opts \\ [])

Wraps Ecto.Repo.all/2.

delete(struct_or_changeset, opts \\ [])

Wraps Ecto.Repo.delete/2.

get(struct, opts \\ [])

Wraps c:Ecto.Repo.get/2.

get_by(struct, opts \\ [])

Wraps c:Ecto.Repo.get_by/2.

insert(struct_or_changeset, opts \\ [])

Wraps Ecto.Repo.insert/2.

insert_all(schema_or_source, entries_or_query, opts)

Wraps Ecto.Repo.insert_all/3.

paginate(queryable, opts \\ [])

Wraps c:Ecto.Repo.paginate/2.

preload(struct_or_changeset, preloads, opts \\ [])

Wraps c:Ecto.Repo.preload/2.

update(changeset, opts \\ [])

Wraps Ecto.Repo.update/2.

update_all(queryable, updates, opts)

Wraps Ecto.Repo.update_all/3.