Class: ActiveRecord::HierarchicalQuery::CTE::RecursiveTerm
- Inherits:
-
Object
- Object
- ActiveRecord::HierarchicalQuery::CTE::RecursiveTerm
- Defined in:
- lib/active_record/hierarchical_query/cte/recursive_term.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #arel ⇒ Object
- #bind_values ⇒ Object
-
#initialize(builder) ⇒ RecursiveTerm
constructor
A new instance of RecursiveTerm.
Constructor Details
#initialize(builder) ⇒ RecursiveTerm
Returns a new instance of RecursiveTerm.
11 12 13 |
# File 'lib/active_record/hierarchical_query/cte/recursive_term.rb', line 11 def initialize(builder) @builder = builder end |
Instance Attribute Details
#builder ⇒ ActiveRecord::HierarchicalQuery::CTE::Query (readonly)
6 7 8 |
# File 'lib/active_record/hierarchical_query/cte/recursive_term.rb', line 6 def builder @builder end |
Instance Method Details
#arel ⇒ Object
25 26 27 28 29 30 |
# File 'lib/active_record/hierarchical_query/cte/recursive_term.rb', line 25 def arel arel = scope.arel .join(query.recursive_table).on(query.join_conditions) builder.cycle_detector.apply_to_recursive(arel) end |
#bind_values ⇒ Object
16 17 18 |
# File 'lib/active_record/hierarchical_query/cte/recursive_term.rb', line 16 def bind_values scope.bound_attributes end |