Class: ActiveRecord::ConnectionAdapters::SQLiteAdapter
- Inherits:
-
Object
- Object
- ActiveRecord::ConnectionAdapters::SQLiteAdapter
- Defined in:
- lib/sql-logging/adapters/sqlite.rb
Instance Method Summary collapse
Instance Method Details
#execute_with_sql_logging(sql, name = nil) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/sql-logging/adapters/sqlite.rb', line 2 def execute_with_sql_logging(sql, name = nil) res = nil elapsed = Benchmark.measure do res = execute_without_sql_logging(sql, name) end msec = elapsed.real * 1000 SqlLogging::Statistics.record_query(sql, name, msec, res) res end |