Module: ActiveRecord::Turntable::ActiveRecordExt::AbstractAdapter::V5_0
- Defined in:
- lib/active_record/turntable/active_record_ext/abstract_adapter.rb
Instance Method Summary collapse
Instance Method Details
#log(sql, name = "SQL", binds = [], statement_name = nil) ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/active_record/turntable/active_record_ext/abstract_adapter.rb', line 85 def log(sql, name = "SQL", binds = [], statement_name = nil) @instrumenter.instrument( "sql.active_record", :sql => sql, :name => name, :connection_id => object_id, :statement_name => statement_name, :binds => binds, :turntable_shard_name => turntable_shard_name) { yield } rescue => e raise translate_exception_class(e, sql) end |