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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Brent Miller
2008-Jun-22 05:51 UTC
Re: how do I make a direct SQL call (e.g. LOCK TABLES)?
You can call: Mymodel.connection.execute("LOCK TABLES...") with whatever SQL you need... Brent Greg Hauptmann 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-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---