View Source Dx.Ecto.Query.Builder (dx v0.3.0)

Internal data structure to keep track of all context needed to translate complex Dx rules to Ecto queries.

context-switches

Context switches

evaluate-rule-on-other-subject

Evaluate rule on other subject

  • Can not access existing aliases
  • Reset path
  • Keep only next alias index

subquery-exists

Subquery (EXISTS)

  • Can access existing aliases & path
  • Mark existing aliases & path entries as :parent
  • Add alias & path entry

join

Join

  • Can access existing aliases & path
  • Add alias & path entry

Link to this section Summary

Link to this section Types

@type mapped_alias() :: {atom(), module(), %{required(atom()) => mapped_alias()}}
@type t() :: %Dx.Ecto.Query.Builder{
  aliases: mapped_alias() | nil,
  eval: Dx.Evaluation.t() | nil,
  in_subquery?: boolean(),
  negate?: boolean(),
  next_alias_index: non_neg_integer(),
  path: [atom()],
  query: Ecto.Query.t() | nil,
  root_query: Ecto.Query.t() | nil,
  types: [atom()]
}

Link to this section Functions