Is it possible to lock database table. MySQL Example:
LOCK TABLES users WRITE
..using some native ActiveRecord methods?
This is not supported by ActiveRecord, you will have to run it manually with:
ActiveRecord::Base.connection.execute("LOCK TABLE users WRITE")
You may want to check out this discussion at ruby-forum.com for some more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With