Class: ActiveRecord::ConnectionAdapters::Mysql2Adapter

Inherits:
AbstractMysqlAdapter
  • Object
show all
Defined in:
lib/action_cost/extensions/mysql2_adapter.rb

Instance Method Summary collapse

Instance Method Details

#execute_with_action_cost(sql, name = '') ⇒ Object



5
6
7
8
9
10
# File 'lib/action_cost/extensions/mysql2_adapter.rb', line 5

def execute_with_action_cost(sql, name='')
  #Rails.logger.debug "execute_with_action_cost: #{sql}"
  parser = ActionCost::SqlParser.new(sql)
  ActionCost::Middleware.push_sql_parser(parser)
  execute_without_action_cost(sql, name)
end