How can I set flag CLIENT_MULTI_STATEMENTS for mysql2 ruby gem?
Or another way to run multiple queries in one function call in 开发者_开发知识库mysql2 gem?
When you setup a new client you can add it to the flags
client = Mysql2::Client.new(:host => 'localhost', :database => 'my_db', :username => "root", :password => "", :flags => Mysql2::Client::MULTI_STATEMENTS)
精彩评论