How to set CLIENT_MULTI_STATEMENTS flag for ruby ​​gem mysql2?

Or another way to run multiple queries in a single function call in gem mysql2?

+3
source share
1 answer

When setting up 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)
+1
source

Source: https://habr.com/ru/post/1766221/


All Articles