Class: ActiveRecord::HierarchicalQuery::CTE::NonRecursiveTerm
- Inherits:
-
Object
- Object
- ActiveRecord::HierarchicalQuery::CTE::NonRecursiveTerm
- Defined in:
- lib/active_record/hierarchical_query/cte/non_recursive_term.rb
Constant Summary collapse
- DISALLOWED_CLAUSES =
:order, :limit, :offset, :group, :having
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
Instance Method Summary collapse
- #arel ⇒ Object
- #bind_values ⇒ Object
-
#initialize(builder) ⇒ NonRecursiveTerm
constructor
A new instance of NonRecursiveTerm.
Constructor Details
#initialize(builder) ⇒ NonRecursiveTerm
Returns a new instance of NonRecursiveTerm.
13 14 15 |
# File 'lib/active_record/hierarchical_query/cte/non_recursive_term.rb', line 13 def initialize(builder) @builder = builder end |
Instance Attribute Details
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
9 10 11 |
# File 'lib/active_record/hierarchical_query/cte/non_recursive_term.rb', line 9 def builder @builder end |
Instance Method Details
#arel ⇒ Object
27 28 29 30 31 |
# File 'lib/active_record/hierarchical_query/cte/non_recursive_term.rb', line 27 def arel arel = scope.arel builder.cycle_detector.apply_to_non_recursive(arel) end |
#bind_values ⇒ Object
18 19 20 |
# File 'lib/active_record/hierarchical_query/cte/non_recursive_term.rb', line 18 def bind_values scope.bound_attributes end |