lib/fertile_forest/modules/reconstructers.rb
#
# Normalize ff_queue fields in ordered grove.
# @param node_obj [Entity|Integer] Start node.
# @param boundary_node_obj [Entity|Integer] Boundary node.
# @return [Boolean] true: Success.
# @return [Boolean] false: Failure.
#
Normalize ff_queue fields in ordered grove.
Normalize ff_queue fields in ordered grove .
def normalize_queue(node_obj = nil, boundary_node_obj = nil)
            transaction do
              aim_node = ff_resolve_nodes(node_obj)
              aim_boundary_node = ff_resolve_nodes(boundary_node_obj)
              aim_top_queue      = aim_node         .blank? ? nil : aim_node         .ff_queue
              aim_boundary_queue = aim_boundary_node.blank? ? nil : aim_boundary_node.ff_queue
              res = ff_evenize(aim_node.ff_grove, aim_top_queue, aim_boundary_queue, 0)  
              if res.present?
                res[EVENIZE_AFFECTED_ROWS_KEY]
              else
                false
              end
            end
          end
def normalize_queue ( node_obj = nil , boundary_node_obj = nil ) transaction do aim_node = ff_resolve_nodes ( node_obj ) aim_boundary_node = ff_resolve_nodes ( boundary_node_obj ) aim_top_queue = aim_node . blank? ? nil : aim_node . ff_queue aim_boundary_queue = aim_boundary_node . blank? ? nil : aim_boundary_node . ff_queue res = ff_evenize ( aim_node . ff_grove , aim_top_queue , aim_boundary_queue , 0 ) if res . present? res [ EVENIZE_AFFECTED_ROWS_KEY ] else false end end end
Normalize ff_queue fields in ordered grove.
Normalize ff_queue fields in ordered grove .
# nodes can be nil # 0: no appmend node # return value
None
Boolean
None
Boolean
node_obj
None
boundary_node_obj
None