Forage (forage v0.5.0)

Documentation for Forage.

Link to this section Summary

Link to this section Functions

Link to this function

build_plan_and_query(params, schema, options)

See Forage.QueryBuilder.build_plan_and_query/3.

Link to this function

build_query(params, schema, options \\ [])

See Forage.QueryBuilder.build_query/3.

Link to this function

cast_related(repo, schema, attrs)

TODO

Link to this function

naive_search_params(params, field)

See Forage.SearchPostgreSQL.naive_search_params/2.

Link to this function

paginate(params, schema, options, repo_opts)

See Forage.Paginator.paginate/4.

Link to this function

preload_in_changeset(changeset, repo, preloads)

Preload the associations in a changeset

Link to this function

preload_in_result(arg, repo, preloads)

Preload the associations in a database result.

It accepts the following types of result:

  • {:ok, struct} where struct is an ecto schema
  • {:error, changeset} where changeset is a changeset

This function is optimized to process the results of operations such as c:Repo.insert/1 and c:Repo.update/1.

Link to this function

put_assoc(changeset, attrs, field)

TODO