Sha256: 739199113327bd6a448efaba907be6697d0afe5f0e5002c6e0572d52fdb351d6
Contents?: true
Size: 616 Bytes
Versions: 19
Compression:
Stored size: 616 Bytes
Contents
require 'sequel/database/logging' require 'active_support/notifications' module Sequel class Database def log_yield_with_instrumentation(sql, args = nil, &block) ActiveSupport::Notifications.instrument( 'sql.rom', sql: sql, name: instrumentation_name, binds: args ) do log_yield_without_instrumentation(sql, args, &block) end end alias_method :log_yield_without_instrumentation, :log_yield alias_method :log_yield, :log_yield_with_instrumentation private def instrumentation_name "ROM[#{database_type}]" end end end
Version data entries
19 entries across 19 versions & 1 rubygems