Class: Mysql2::Client

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

Instance Method Summary collapse

Instance Method Details

#query(*args, &blk) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/patches/db/mysql2.rb', line 19

def query(*args,&blk)
  return query_without_profiling(*args,&blk) unless SqlPatches.should_measure?

  result, record = SqlPatches.record_sql( args[0] ) do
    query_without_profiling(*args,&blk)
  end
  result.instance_variable_set("@miniprofiler_sql_id", record) if result
  result
end

#query_without_profilingObject



18
# File 'lib/patches/db/mysql2.rb', line 18

alias_method :query_without_profiling, :query