Composite (composite v0.2.0)

Link to this section Summary

Link to this section Types

Link to this type

apply_param(query)

Specs

apply_param(query) :: (query, any() -> query)
Link to this type

dependency_name()

Specs

dependency_name() :: atom()
Link to this type

dependency_option()

Specs

dependency_option() :: {:requires, dependency_name() | [dependency_name()]}
Link to this type

load_dependency(query)

Specs

load_dependency(query) :: (query -> query)
Link to this type

param_option(query)

Specs

param_option(query) ::
  {:requires,
   dependency_name()
   | [dependency_name()]
   | (value :: any() -> nil | dependency_name() | [dependency_name()])}
  | {:ignore?, (any() -> boolean())}
  | {:on_ignore, (query -> query)}
Link to this type

param_path_item()

Specs

param_path_item() :: any()

Specs

params() :: Access.t()

Specs

t(query) :: %Composite{
  dep_definitions: %{
    optional(dependency_name()) => [
      {load_dependency(query), [dependency_option()]}
    ]
  },
  input_query: query,
  param_definitions: [
    {[param_path_item()], apply_param(query), [param_option(query)]}
  ],
  params: params()
}

Link to this section Functions

Link to this function

apply(composite)

Specs

apply(t(query)) :: query when query: any()
Link to this function

apply(input_query, composite, params)

Specs

apply(query, t(query), params()) :: query when query: any()
Link to this function

dependency(composite, dependency, func, opts \\ [])

Specs

dependency(t(query), dependency_name(), load_dependency(query), [
  dependency_option()
]) :: t(query)
when query: any()

Specs

new() :: t(any())
Link to this function

new(input_query, params)

Specs

new(query, params()) :: t(query) when query: any()
Link to this function

param(composite, path, func, opts \\ [])

Specs

param(t(query), param_path_item() | [param_path_item()], apply_param(query), [
  param_option(query)
]) :: t(query)
when query: any()