diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-25 20:59:37 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-25 20:59:37 +0200 |
commit | 304c49b1468ce71beb7e3ea0ca4c5add73a1534e (patch) | |
tree | 459d52879fe866fe5321a730919a2ac6b7c55805 /activerecord/lib/active_record/connection_adapters | |
parent | ff0d842454571d78addd1fe9d4f232b600881b1a (diff) | |
download | rails-304c49b1468ce71beb7e3ea0ca4c5add73a1534e.tar.gz rails-304c49b1468ce71beb7e3ea0ca4c5add73a1534e.tar.bz2 rails-304c49b1468ce71beb7e3ea0ca4c5add73a1534e.zip |
Move runtime back to connection.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index c07ba2ac74..c103fcccf7 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -34,11 +34,13 @@ module ActiveRecord include QueryCache include ActiveSupport::Callbacks + attr_accessor :runtime define_callbacks :checkout, :checkin def initialize(connection, logger = nil) #:nodoc: @active = nil @connection, @logger = connection, logger + @runtime = 0 @query_cache_enabled = false @query_cache = {} end @@ -89,6 +91,11 @@ module ActiveRecord false end + def reset_runtime #:nodoc: + rt, @runtime = @runtime, 0 + rt + end + # QUOTING ================================================== # Override to return the quoted table name. Defaults to column quoting. |