Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
# frozen_string_literal: true
module Migrations::Database
class PreparedStatementCache < LruRedux::Cache
class PreparedStatementHash < Hash
def shift
result = super
if (stmt = result[1])
stmt.close
end
result
def clear
each_value(&:close)
super
def initialize(*args)
@data = PreparedStatementHash.new