Module: DatabaseRecorder::Mysql2::ClientExt

Defined in:
lib/database_recorder/mysql2/client_ext.rb

Instance Method Summary collapse

Instance Method Details

#prepare(*args) ⇒ Object



12
13
14
15
16
# File 'lib/database_recorder/mysql2/client_ext.rb', line 12

def prepare(*args)
  Recorder.prepare_statement(self, sql: args[0], source: :prepare) do
    super
  end
end

#query(sql, options = {}) ⇒ Object



6
7
8
9
10
# File 'lib/database_recorder/mysql2/client_ext.rb', line 6

def query(sql, options = {})
  Recorder.store_query(self, sql: sql, source: :query) do
    super
  end
end