Class: ActiveRecord::ConnectionAdapters::MysqlAdapter
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::MysqlAdapter
- Defined in:
- lib/sql-logging/adapters/mysql.rb
Instance Method Summary collapse
Instance Method Details
#select_with_sql_logging(sql, *args) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/sql-logging/adapters/mysql.rb', line 4 def select_with_sql_logging(sql, *args) rows = nil elapsed = Benchmark.measure do rows = select_without_sql_logging(sql, *args) end msec = elapsed.real * 1000 SqlLogging::Statistics.record_query(sql, args.first, msec, rows) rows end |