Class: ActiveRecord::HierarchicalQuery::Adapters::PostgreSQL Private

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/hierarchical_query/adapters/postgresql.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(builder) ⇒ PostgreSQL

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of PostgreSQL.



17
18
19
20
21
# File 'lib/active_record/hierarchical_query/adapters/postgresql.rb', line 17

def initialize(builder)
  @builder = builder
  @table = klass.arel_table
  @query = CTE::Query.new(builder)
end

Instance Attribute Details

#builderObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/active_record/hierarchical_query/adapters/postgresql.rb', line 10

def builder
  @builder
end

#tableObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
# File 'lib/active_record/hierarchical_query/adapters/postgresql.rb', line 10

def table
  @table
end

Instance Method Details

#priorObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



23
24
25
# File 'lib/active_record/hierarchical_query/adapters/postgresql.rb', line 23

def prior
  @query.recursive_table
end