Sha256: df92f6c70dbd2501aa8aaa10030b931e0bf4c1945a738072b8002c5626899178
Contents?: true
Size: 553 Bytes
Versions: 33
Compression:
Stored size: 553 Bytes
Contents
require 'sequel/database/logging' require 'active_support/notifications' module ROM module SQL module ActiveSupportInstrumentation def log_connection_yield(sql, _conn, args = nil) ActiveSupport::Notifications.instrument( 'sql.rom', sql: sql, name: instrumentation_name, binds: args ) { super } end private def instrumentation_name "ROM[#{database_type}]" end end end end Sequel::Database.send(:prepend, ROM::SQL::ActiveSupportInstrumentation)
Version data entries
33 entries across 33 versions & 1 rubygems