class PG::Result
PG
patches, keep in mind exec and async_exec have a exec{|r| } semantics that is yet to be implemented
Public Instance Methods
each(*args, &blk)
click to toggle source
# File lib/patches/db/pg.rb, line 15 def each(*args, &blk) return each_without_profiling(*args, &blk) unless defined?(@miniprofiler_sql_id) mp_report_sql do each_without_profiling(*args, &blk) end end
Also aliased as: each_without_profiling
mp_report_sql() { || ... }
click to toggle source
# File lib/patches/db/pg.rb, line 22 def mp_report_sql(&block) start = Process.clock_gettime(Process::CLOCK_MONOTONIC) result = yield elapsed_time = SqlPatches.elapsed_time(start) @miniprofiler_sql_id.report_reader_duration(elapsed_time) result end
values(*args, &blk)
click to toggle source
# File lib/patches/db/pg.rb, line 8 def values(*args, &blk) return values_without_profiling(*args, &blk) unless defined?(@miniprofiler_sql_id) mp_report_sql do values_without_profiling(*args , &blk) end end
Also aliased as: values_without_profiling