Class: Rails::Log::Profiling::QueryLogSubscriber
- Inherits:
-
ActiveRecord::LogSubscriber
- Object
- ActiveRecord::LogSubscriber
- Rails::Log::Profiling::QueryLogSubscriber
- Defined in:
- lib/rails/log/profiling/query_log_subscriber.rb
Instance Method Summary collapse
Instance Method Details
#sql(event) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rails/log/profiling/query_log_subscriber.rb', line 6 def sql(event) locations = get_locations return if locations.empty? payload = event.payload return if IGNORE_PAYLOAD_NAMES.include?(payload[:name]) if ActiveRecord.version >= Gem::Version.new("5.0.0.beta") ar_ver_5(event, locations) else ar_ver_4(event, locations) end end |