greg
1
Hi,
I’m stuck. I can’t quite see in Rails how to make a direct database
call
(e.g. LOCK TABLES…), and leverage the rails connection framework?
How do you do this? I see the “execute” command in
ActiveRecord::ConnectionAdapters::DatabaseStatements
doesn’t seem to work.
Thanks
greg
2
You can call:
Mymodel.connection.execute(“LOCK TABLES…”)
with whatever SQL you need…
Brent
Greg H. wrote:
Hi,
I’m stuck. I can’t quite see in Rails how to make a direct database
call
(e.g. LOCK TABLES…), and leverage the rails connection framework?
How do you do this? I see the “execute” command in
ActiveRecord::ConnectionAdapters::DatabaseStatements
doesn’t seem to work.
Thanks