class PG::Result

Public Instance Methods

each(*args, &blk) click to toggle source
# File Ruby/lib/patches/sql_patches.rb, line 79
def each(*args, &blk)
  return each_without_profiling(*args, &blk) unless @miniprofiler_sql_id

  start = Time.now
  result = each_without_profiling(*args,&blk)
  elapsed_time = ((Time.now - start).to_f * 1000).round(1)

  @miniprofiler_sql_id.report_reader_duration(elapsed_time)
  result
end
Also aliased as: each_without_profiling
each_without_profiling(*args, &blk) click to toggle source
Alias for: each
values(*args, &blk) click to toggle source
# File Ruby/lib/patches/sql_patches.rb, line 68
def values(*args, &blk)
  return values_without_profiling(*args, &blk) unless @miniprofiler_sql_id

  start = Time.now
  result = values_without_profiling(*args,&blk)
  elapsed_time = ((Time.now - start).to_f * 1000).round(1)

  @miniprofiler_sql_id.report_reader_duration(elapsed_time)
  result
end
Also aliased as: values_without_profiling
values_without_profiling(*args, &blk) click to toggle source
Alias for: values