Hello all, I would like to know if there is a way to return a resultset from a MySQL stored procedure to rails, I''ve tryied many things but I always get the same error, I found that I need to patch the MySQL connectore, but that info is from 2006 I am ussing rails 2.3.2, Is there a way do this ? I need to do a lot of things inside the SP, like creating temporary tables, perform some calculations, etc. I would appreciate your help 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 -~----------~----~----~----~------~----~------~--~---
After searching the web, I''ve just found that I have to patch the mysql adapter, this is not good, I can understad the rails framework developers being of the opinion that complexity is best located in the code and not in the database, does not advocate using stored procedures as a abstraction layer between the database and the application. But sometimes it is really neccesary to use stored procedures, What happen if you execute a query that returns thousand and thousand of records(it will create an object for each record)? you need to precess them, perform some calculations, I think they sould think about all the scenarios. Really, they should think about this 2009/7/7 Sergio Sergio <sergio.sprite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> Hello all, I would like to know if there is a way to return a resultset > from a MySQL stored procedure to rails, I''ve tryied many things but I always > get the same error, I found that I need to patch the MySQL connectore, but > that info is from 2006 I am ussing rails 2.3.2, Is there a way do this ? I > need to do a lot of things inside the SP, like creating temporary tables, > perform some calculations, etc. > > > I would appreciate your help > > > 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 -~----------~----~----~----~------~----~------~--~---
Ok, I found a way to get a resultset from a stored procedure, please visit this page: http://guyharrison.typepad.com/guy_harrisons_blog/2006/04/mysql_stored_pr.html Thanks to all 2009/7/9 Sergio Sergio <sergio.sprite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> After searching the web, I''ve just found that I have to patch the mysql > adapter, this is not good, I can understad the rails framework developers > being of the opinion that complexity is best located in the code and not in > the database, does not advocate using stored procedures as a abstraction > layer between the database and the application. But sometimes it is really > neccesary to use stored procedures, What happen if you execute a query that > returns thousand and thousand of records(it will create an object for each > record)? you need to precess them, perform some calculations, I think they > sould think about all the scenarios. Really, they should think about this > > 2009/7/7 Sergio Sergio <sergio.sprite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> Hello all, I would like to know if there is a way to return a resultset >> from a MySQL stored procedure to rails, I''ve tryied many things but I always >> get the same error, I found that I need to patch the MySQL connectore, but >> that info is from 2006 I am ussing rails 2.3.2, Is there a way do this ? I >> need to do a lot of things inside the SP, like creating temporary tables, >> perform some calculations, etc. >> >> >> I would appreciate your help >> >> >> 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 -~----------~----~----~----~------~----~------~--~---