OuterfacesEctoApi.QueryEngine.QueryAssociator (Outerfaces Ecto API v0.2.8)

View Source

Helper functions for API models.

Summary

Functions

pre_serialize_fields(result, source_record, fields, opts)

@spec pre_serialize_fields(
  result :: map(),
  source_record :: map(),
  fields :: [atom() | {atom(), [atom()]}],
  opts :: Keyword.t()
) :: map()

preload_and_serialize(repo, queryable, preloads, opts)

@spec preload_and_serialize(
  repo :: Ecto.Repo.t(),
  queryable :: Ecto.Queryable.t() | [Ecto.Queryable.t()],
  preloads :: [atom() | {atom(), [atom()]}],
  opts :: Keyword.t()
) :: [map()]