Class: ActiveRecord::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/patches/db/oracle_enhanced.rb

Instance Method Summary collapse

Instance Method Details

#each(&blk) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/patches/db/oracle_enhanced.rb', line 3

def each(&blk)
  return each_without_profiling(&blk) unless @miniprofiler_sql_id

  start        = Time.now
  result       = each_without_profiling(&blk)
  elapsed_time = SqlPatches.elapsed_time(start)
  @miniprofiler_sql_id.report_reader_duration(elapsed_time)

  result
end

#each_without_profilingObject



2
# File 'lib/patches/db/oracle_enhanced.rb', line 2

alias_method :each_without_profiling, :each