Hi, I have a question about bundle: RoR + oracle + bind variables. Heaving read forums/blogs/etc I found out RoR does not use bind vars for oracle particularly (and for all adapters in general). Then I found Michael''s patch (http://dev.rubyonrails.org/attachment/ticket/5199/oracle_bind.patch) but it was not added to the following RoR versions (since the end of May). As I suppose it was not added because of it was an attempt to find a solution only for oracle adapter (not for all). Next my step I made an attempt to use this patch (for RoR 1.1.16; text from it was added manually), but update clause was failed. #1 Does anybody know: are any developments on including bind vars to RoR (especially oracle)? #2 Please, advise me how to resolve the problem of use oracle bind vars in RoR? Your replies will be very much appreciated! Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
As nobody has answers to my questions I had to patch oracle_adapter.rb: @@ -567,6 +567,7 @@ conn = OCI8.new username, password, database conn.exec %q{alter session set nls_date_format = ''YYYY-MM-DD HH24:MI:SS''} conn.exec %q{alter session set nls_timestamp_format ''YYYY-MM-DD HH24:MI:SS''} rescue nil + conn.exec %q{alter session set cursor_sharing = ''FORCE''} rescue nil conn.autocommit = true conn end :( Vladimir Kurnavenkov wrote:> Hi, > I have a question about bundle: RoR + oracle + bind variables. > Heaving read forums/blogs/etc I found out RoR does not use bind vars > for oracle particularly (and for all adapters in general). > Then I found Michael''s patch > (http://dev.rubyonrails.org/attachment/ticket/5199/oracle_bind.patch) > but it was not added to the following RoR versions (since the end of > May). As I suppose it was not added because of it was an attempt to > find a solution only for oracle adapter (not for all). > Next my step I made an attempt to use this patch (for RoR 1.1.16; text > from it was added manually), but update clause was failed. > #1 Does anybody know: are any developments on including bind vars to > RoR (especially oracle)? > #2 Please, advise me how to resolve the problem of use oracle bind vars > in RoR? > Your replies will be very much appreciated! > Thanks.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Perhaps create an oracle_activerecord gem to house additional AR functionality for Oracle ppl? Then we can go to town on making Oracle ActiveRecords extra sexy. Nic Vladimir Kurnavenkov wrote:> As nobody has answers to my questions I had to patch oracle_adapter.rb: > @@ -567,6 +567,7 @@ > conn = OCI8.new username, password, database > conn.exec %q{alter session set nls_date_format = ''YYYY-MM-DD > HH24:MI:SS''} > conn.exec %q{alter session set nls_timestamp_format > ''YYYY-MM-DD HH24:MI:SS''} rescue nil > + conn.exec %q{alter session set cursor_sharing = ''FORCE''} rescue > nil > conn.autocommit = true > conn > end > :( > > Vladimir Kurnavenkov wrote: > > Hi, > > I have a question about bundle: RoR + oracle + bind variables. > > Heaving read forums/blogs/etc I found out RoR does not use bind vars > > for oracle particularly (and for all adapters in general). > > Then I found Michael''s patch > > (http://dev.rubyonrails.org/attachment/ticket/5199/oracle_bind.patch) > > but it was not added to the following RoR versions (since the end of > > May). As I suppose it was not added because of it was an attempt to > > find a solution only for oracle adapter (not for all). > > Next my step I made an attempt to use this patch (for RoR 1.1.16; text > > from it was added manually), but update clause was failed. > > #1 Does anybody know: are any developments on including bind vars to > > RoR (especially oracle)? > > #2 Please, advise me how to resolve the problem of use oracle bind vars > > in RoR? > > Your replies will be very much appreciated! > > Thanks.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Vladimir Kurnavenkov wrote:> As nobody has answers to my questions I had to patch oracle_adapter.rb:Apologies, I hadn''t seen your question being asked. The bind variables patch I had posted a while back was a bad ugly hack that I asked not be applied. I have a much cleaner approach in progress that I expect to submit sometime soonish. In the meantime, setting cursor sharing to "similar" or "forced" is your best bet. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Dr Nic wrote:> Perhaps create an oracle_activerecord gem to house additional AR > functionality for Oracle ppl? Then we can go to town on making Oracle > ActiveRecords extra sexy.I''d prefer we don''t splinter it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Thanks a lot for your answer! Michael A. Schoen wrote:> Vladimir Kurnavenkov wrote: > > As nobody has answers to my questions I had to patch oracle_adapter.rb: > > Apologies, I hadn''t seen your question being asked. > > The bind variables patch I had posted a while back was a bad ugly hack > that I asked not be applied. I have a much cleaner approach in progress > that I expect to submit sometime soonish. > > In the meantime, setting cursor sharing to "similar" or "forced" is your > best bet.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---