module Mysql2::Client::GeneralLog

Constants

VERSION

Attributes

general_log[RW]

Public Class Methods

new(opts = {}) click to toggle source
Calls superclass method
# File lib/mysql2/client/general_log.rb, line 17
def initialize(opts = {})
  @general_log = []
  super
end

Public Instance Methods

query(sql, options={}) click to toggle source

dependent on Mysql2::Client#query

Calls superclass method
# File lib/mysql2/client/general_log.rb, line 23
def query(sql, options={})
  ret = nil
  time = Benchmark.realtime do
    ret = super
  end
  @general_log << Log.new(sql, caller_locations, time)
  ret
end