mysqlplus/lib/mysqlplus.rb

18 lines
279 B
Ruby
Raw Normal View History

require 'mysql'
class Mysql
def async_query(sql)
send_query(sql)
select [ (@sockets ||= {})[socket] ||= IO.new(socket) ], nil, nil, nil
get_result
end
end
2008-09-06 01:59:20 +00:00
class Mysql::Result
def all_hashes
rows = []
each_hash { |row| rows << row }
rows
end
end