lib/fertile_forest/modules/finders.rb
def ff_get_boundary_node(base_node)
            # create subquery conditions
            boundary_queue_subquery = ff_create_boundary_queue_subquery(base_node)
            # create query to get boundary node.
            ff_required_columns_scope()
                .ff_usual_conditions_scope(base_node.ff_grove)
                .ff_usual_order_scope()
                .where(arel_table[:ff_queue].in(boundary_queue_subquery))
                .first
          end
#
# Find trunk (= ancestor) nodes from base node in ordered range.
#
# @param base_obj [Entity|Integer] Base node|id to find.
# @param range [Integer] Ordered range of trunk nodes.
#   -1:To designate as root node.
# @param columns [Array] Columns for SELECT clause.
# @return [ActiveRecord::Relation] Basic query for finding trunk nodes.
# @return [nil] No trunk nodes.
#
Find trunk (= ancestor) nodes from base node in ordered range.
Find trunk ( = ancestor ) nodes from base node in ordered range .
def ff_get_boundary_node(base_node)
            boundary_queue_subquery = ff_create_boundary_queue_subquery(base_node)
            ff_required_columns_scope()
                .ff_usual_conditions_scope(base_node.ff_grove)
                .ff_usual_order_scope()
                .where(arel_table[:ff_queue].in(boundary_queue_subquery))
                .first
          end
def ff_get_boundary_node ( base_node ) boundary_queue_subquery = ff_create_boundary_queue_subquery ( base_node ) ff_required_columns_scope ( ) . ff_usual_conditions_scope ( base_node . ff_grove ) . ff_usual_order_scope ( ) . where ( arel_table [ :ff_queue ] . in ( boundary_queue_subquery ) ) . first end
Find trunk (= ancestor) nodes from base node in ordered range.
Find trunk ( = ancestor ) nodes from base node in ordered range .
# create subquery conditions # create query to get boundary node.
Basic query for finding trunk nodes.
Basic query for finding trunk nodes .
ActiveRecord::Relation
No trunk nodes.
No trunk nodes .
nil
base_node
base_obj
Base node|id to find.
Base node|id to find .
range
Ordered range of trunk nodes. -1:To designate as root node.
Ordered range of trunk nodes . - 1 : To designate as root node .
columns
Columns for SELECT clause.
Columns for SELECT clause .