Class: ActiveRecord::Futures::QueryRecording::ConnectionProxy

Inherits:
Proxy
  • Object
show all
Defined in:
lib/active_record/futures/query_recording.rb

Instance Attribute Summary collapse

Attributes inherited from Proxy

#proxied

Instance Method Summary collapse

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

#connectionObject (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_bindsObject

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_queryObject

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