Class: Mysql2::EM::Client
Defined Under Namespace
Modules: Watcher
Instance Method Summary collapse
Methods inherited from Client
#affected_rows, #async_result, #close, #escape, #info, #initialize, #last_id, new, #server_info, #socket
Constructor Details
This class inherits a constructor from Mysql2::Client
Instance Method Details
#query(sql, opts = {}) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/mysql2/em.rb', line 25 def query(sql, opts={}) super(sql, opts.merge(:async => true)) deferable = ::EM::DefaultDeferrable.new ::EM.watch(self.socket, Watcher, self, deferable).notify_readable = true deferable end |