1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

revises some details in the previous explain patch

This commit is contained in:
Xavier Noria 2011-12-02 09:19:13 -08:00
parent 9acb340e88
commit 36cc1f78eb
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
module ActiveRecord
module Explain # :nodoc
module Explain # :nodoc:
# logging_query_plan calls could appear nested in the call stack. In
# particular this happens when a relation fetches its records, since
# that results in find_by_sql calls downwards.
@ -31,7 +31,7 @@ module ActiveRecord
# SCHEMA queries cannot be EXPLAINed, also we do not want to run EXPLAIN on
# our own EXPLAINs now matter how loopingly beautiful that would be.
SKIP_EXPLAIN_FOR = %(SCHEMA EXPLAIN)
SKIP_EXPLAIN_FOR = %w(SCHEMA EXPLAIN)
def ignore_explain_notification?(payload)
payload[:exception] || SKIP_EXPLAIN_FOR.include?(payload[:name])
end

View file

@ -155,7 +155,7 @@ module ActiveRecord
# Please see further details in the
# {Active Record Query Interface guide}[http://edgeguides.rubyonrails.org/active_record_querying.html#running-explain].
def explain
results, sqls, binds = collecting_sqls_for_explain { exec_query }
_, sqls, binds = collecting_sqls_for_explain { exec_query }
exec_explain(sqls, binds)
end

View file

@ -5,7 +5,7 @@
configuration files. With a value of 0.5 in development.rb, and commented
out in production.rb. No mention in test.rb. *fxn*
* Display mounted engine's routes in `rake routes`. *Piotr Sarnacki*
* Add DebugExceptions middleware which contains features extracted from ShowExceptions middleware *José Valim*
* Display mounted engine's routes in `rake routes` *Piotr Sarnacki*