I have a standalone batch program that is going to move data between two databases. I am taking advantage of the AR connection semantics in database.yml to get connections to these two DBs. But I want to do all of my DB access at the DBI/DBD level for performance reasons. I am having trouble getting access to the underlying DBI handle so that I can prepare SQL statements, execute them etc. From a connection retrieve via AR::Base.retrieve_connection, how can I get at the DBI handle? Is it possible that I''ve misunderstood that AR DB access is built on top of DBI? Thanks, Wes -- 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 -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2008-Dec-01 18:58 UTC
Re: Getting at DBI connection via ActiveRecord connection
Upon further inspection, I see that AR doesn''t depend on DBI. I wonder why not... As it turns out, I''m in a JRuby environment, so I can just do prepared statements via that method. Thanks, Wes -- 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 -~----------~----~----~----~------~----~------~--~---