Class: PG::Result
- Inherits:
-
Object
- Object
- PG::Result
- Defined in:
- lib/patches/sql_patches.rb
Instance Method Summary collapse
- #each(*args, &blk) ⇒ Object
- #each_without_profiling ⇒ Object
- #values(*args, &blk) ⇒ Object
- #values_without_profiling ⇒ Object
Instance Method Details
#each(*args, &blk) ⇒ Object
79 80 81 82 83 84 85 86 87 88 |
# File '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 |
#each_without_profiling ⇒ Object
65 |
# File 'lib/patches/sql_patches.rb', line 65 alias_method :each_without_profiling, :each |
#values(*args, &blk) ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File '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 |
#values_without_profiling ⇒ Object
66 |
# File 'lib/patches/sql_patches.rb', line 66 alias_method :values_without_profiling, :values |