mysqlplus/lib/mysqlplus.rb
2008-10-02 01:56:10 +01:00

19 lines
299 B
Ruby

require 'mysql'
class Mysql
def async_query(sql, timeout = nil)
send_query(sql)
select [ (@sockets ||= {})[socket] ||= IO.new(socket) ], nil, nil, nil
get_result
end
end
class Mysql::Result
def all_hashes
rows = []
each_hash { |row| rows << row }
rows
end
end