Class: ActiveRecord::Futures::QueryRecording::ConnectionProxy
- Defined in:
- lib/active_record/futures/query_recording.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#recorded_binds ⇒ Object
Returns the value of attribute recorded_binds.
-
#recorded_query ⇒ Object
Returns the value of attribute recorded_query.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#initialize(connection) ⇒ ConnectionProxy
constructor
A new instance of ConnectionProxy.
- #select_all(arel, name = nil, binds = []) ⇒ Object
- #select_value(arel, name = nil) ⇒ Object
Methods inherited from Proxy
#!=, #==, #method_missing, #proxy?, #respond_to?
Constructor Details
#initialize(connection) ⇒ ConnectionProxy
Returns a new instance of ConnectionProxy.
43 44 45 46 |
# File 'lib/active_record/futures/query_recording.rb', line 43 def initialize(connection) super(connection) @connection = connection end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveRecord::Futures::Proxy
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
40 41 42 |
# File 'lib/active_record/futures/query_recording.rb', line 40 def connection @connection end |
#recorded_binds ⇒ Object
Returns the value of attribute recorded_binds.
41 42 43 |
# File 'lib/active_record/futures/query_recording.rb', line 41 def recorded_binds @recorded_binds end |
#recorded_query ⇒ Object
Returns the value of attribute recorded_query.
41 42 43 |
# File 'lib/active_record/futures/query_recording.rb', line 41 def recorded_query @recorded_query end |
Instance Method Details
#select_all(arel, name = nil, binds = []) ⇒ Object
53 54 55 56 |
# File 'lib/active_record/futures/query_recording.rb', line 53 def select_all(arel, name = nil, binds = []) self.recorded_query = arel [] end |
#select_value(arel, name = nil) ⇒ Object
48 49 50 51 |
# File 'lib/active_record/futures/query_recording.rb', line 48 def select_value(arel, name = nil) self.recorded_query = arel nil end |