Class: CTEProxy
- Inherits:
-
Object
- Object
- CTEProxy
- Includes:
- ActiveRecord::Querying, ActiveRecord::Reflection::ClassMethods, ActiveRecord::Sanitization::ClassMethods
- Defined in:
- lib/postgres_ext/active_record/cte_proxy.rb
Instance Attribute Summary collapse
-
#arel_table ⇒ Object
readonly
Returns the value of attribute arel_table.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#reflections ⇒ Object
Returns the value of attribute reflections.
Instance Method Summary collapse
- #column_names ⇒ Object
- #columns_hash ⇒ Object
-
#initialize(name, model) ⇒ CTEProxy
constructor
A new instance of CTEProxy.
- #name ⇒ Object
- #table_name ⇒ Object
Methods included from ActiveRecord::Querying
Constructor Details
#initialize(name, model) ⇒ CTEProxy
9 10 11 12 13 14 15 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 9 def initialize(name, model) @name = name @arel_table = Arel::Table.new(name) @model = model @connection = model.connection @reflections = {} end |
Instance Attribute Details
#arel_table ⇒ Object (readonly)
Returns the value of attribute arel_table.
7 8 9 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 7 def arel_table @arel_table end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
7 8 9 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 7 def connection @connection end |
#reflections ⇒ Object
Returns the value of attribute reflections.
6 7 8 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 6 def reflections @reflections end |
Instance Method Details
#column_names ⇒ Object
25 26 27 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 25 def column_names @model.column_names end |
#columns_hash ⇒ Object
29 30 31 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 29 def columns_hash @model.columns_hash end |
#name ⇒ Object
17 18 19 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 17 def name @name end |
#table_name ⇒ Object
21 22 23 |
# File 'lib/postgres_ext/active_record/cte_proxy.rb', line 21 def table_name name end |