Module: Mysql2::Client::GeneralLogs

Included in:
Mysql2::Client
Defined in:
lib/mysql2/client/general_logs.rb,
lib/mysql2/client/general_logs/version.rb

Defined Under Namespace

Classes: Log

Constant Summary collapse

VERSION =
"0.1.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#general_logsObject

Returns the value of attribute general_logs.



13
14
15
# File 'lib/mysql2/client/general_logs.rb', line 13

def general_logs
  @general_logs
end

Instance Method Details

#initialize(opts = {}) ⇒ Object



15
16
17
18
# File 'lib/mysql2/client/general_logs.rb', line 15

def initialize(opts = {})
  @general_logs = []
  super
end

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

dependent on Mysql2::Client#query



21
22
23
24
# File 'lib/mysql2/client/general_logs.rb', line 21

def query(sql, options={})
  @general_logs << Log.new(sql, caller_locations)
  super
end