Class: Sequel::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/rom/sql/support/active_support_notifications.rb

Instance Method Summary collapse

Instance Method Details

#log_yield_with_instrumentation(sql, args = nil, &block) ⇒ Object Also known as: log_yield



6
7
8
9
10
11
12
13
14
15
# File 'lib/rom/sql/support/active_support_notifications.rb', line 6

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