提交 86b7d83f 编写于 作者: A Aaron Patterson

initializing @open_transactions in the initialize method

上级 3a29cc34
......@@ -43,6 +43,7 @@ def initialize(connection, logger = nil) #:nodoc:
@connection, @logger = connection, logger
@query_cache_enabled = false
@query_cache = Hash.new { |h,sql| h[sql] = {} }
@open_transactions = 0
@instrumenter = ActiveSupport::Notifications.instrumenter
end
......@@ -177,12 +178,9 @@ def raw_connection
@connection
end
def open_transactions
@open_transactions ||= 0
end
attr_reader :open_transactions
def increment_open_transactions
@open_transactions ||= 0
@open_transactions += 1
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册