Class: EmmyExtends::Mysql2::Client
- Inherits:
-
Mysql2::Client
- Object
- Mysql2::Client
- EmmyExtends::Mysql2::Client
- Defined in:
- lib/emmy_extends/mysql2/client.rb
Instance Method Summary collapse
Instance Method Details
#close(*args) ⇒ Object
14 15 16 17 |
# File 'lib/emmy_extends/mysql2/client.rb', line 14 def close(*args) @watch.detach if @watch super(*args) end |
#query(sql, opts = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/emmy_extends/mysql2/client.rb', line 5 def query(sql, opts={}) if ::EventMachine.reactor_running? super(sql, opts.merge(:async => true)) Mysql2::Operation.new(self) else super(sql, opts) end end |