OuterfacesEctoApi.QueryEngine (Outerfaces Ecto API v0.2.8)
View SourceSummary
Types
@type all_response() :: {:ok, paginated_success()} | {:error, error_response()}
@type error_response() :: %{ :status => pos_integer(), :results => %{ :data => nil, :schema => String.t(), optional(:page_info) => pagination_info() | nil, optional(:id) => integer() }, optional(:debug) => map() }
@type filter_spec() :: OuterfacesEctoApi.QueryEngine.QueryBuilder.filter_spec()
@type get_response() :: {:ok, single_success()} | {:error, error_response()}
@type paginated_success() :: %{ status: pos_integer(), results: %{data: [map()], page_info: pagination_info(), schema: String.t()} }
@type pagination_info() :: OuterfacesEctoApi.QueryEngine.QueryPager.pagination_info()
@type params() :: map()
@type repo() :: Ecto.Repo.t()
@type schema() :: module()
@type single_success() :: %{ status: pos_integer(), results: %{data: map(), schema: String.t(), id: integer()} }
@type sort_spec() :: OuterfacesEctoApi.QueryEngine.QueryBuilder.sort_by_spec()
Functions
@spec all( repo(), schema(), [preload()], [filter_spec()], [sort_spec()], params(), Keyword.t() ) :: all_response()
@spec build( schema(), [filter_spec()], params(), Keyword.t() ) :: {:ok, Ecto.Query.t()} | {:error, atom()}