49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/active_record/turntable/active_record_ext/abstract_adapter.rb', line 49
def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = nil)
@instrumenter.instrument(
"sql.active_record",
sql: sql,
name: name,
binds: binds,
type_casted_binds: type_casted_binds,
statement_name: statement_name,
connection_id: object_id,
turntable_shard_name: turntable_shard_name) do
@lock.synchronize do
yield
end
end
rescue => e
raise translate_exception_class(e, sql)
end
|