app/operations/schemas/orderings/order_builder/compile.rb
def wrap_compilation(definition)
          joins = Concurrent::Map.new

          expression = {}

          joins, _ = with_joins(joins) do
            provide encode_join: encode_join, definition: definition do
              yield expression
            end
          end

          expression[:joins] = joins.each_pair.to_h

          Schemas::Orderings::OrderExpression.new expression
        end
# Set up a dry-effects stack to be consumed by order path compilers
# and the initial join calculator.
#
# @param [Schemas::Ordering::Definition] definition
# @yield [expr] This block is used to set up orderings and any dynamic joins that
#   are derived from the individual {Schemas::Orderings::Definition#order order definitions}.
# @yieldparam [{ Symbol => <Arel::Nodes::Ordering> }] expr A hash that will eventually be set
# @yieldreturn [void] The return value of this block is ignored.
#   `:default_orderings` and `:inverse_orderings` must be set on
#   the yielded `expr` hash.
# @return [Schemas::Orderings::OrderExpression]
Set up a dry-effects stack to be consumed by order path compilers
and the initial join calculator.
Set up a dry - effects stack to be consumed by order path compilers and the initial join calculator .
def wrap_compilation(definition)
          joins = Concurrent::Map.new
          expression = {}
          joins, _ = with_joins(joins) do
            provide encode_join: encode_join, definition: definition do
              yield expression
            end
          end
          expression[:joins] = joins.each_pair.to_h
          Schemas::Orderings::OrderExpression.new expression
        end
def wrap_compilation ( definition ) joins = Concurrent :: Map . new expression = { } joins , _ = with_joins ( joins ) do provide encode_join : encode_join , definition : definition do yield expression end end expression [ :joins ] = joins . each_pair . to_h Schemas :: Orderings :: OrderExpression . new expression end
Set up a dry-effects stack to be consumed by order path compilers
and the initial join calculator.
Set up a dry - effects stack to be consumed by order path compilers and the initial join calculator .
The return value of this block is ignored. `:default_orderings` and `:inverse_orderings` must be set on the yielded `expr` hash.
The return value of this block is ignored . ` : default_orderings ` and ` : inverse_orderings ` must be set on the yielded ` expr ` hash .
void
None
Schemas::Orderings::OrderExpression
definition
expr A hash that will eventually be set
expr A hash that will eventually be set
]
This block is used to set up orderings and any dynamic joins that are derived from the individual {Schemas::Orderings::Definition#order order definitions}.
This block is used to set up orderings and any dynamic joins that are derived from the individual { Schemas :: Orderings :: Definition#order order definitions } .