How can I set flag CLIENT_MULTI_STATEMENTS for mysql2 ruby gem?
Question
Or another way to run multiple queries in one function call in mysql2 gem?
Solution
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)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow