Brian Corrigan
2006-Mar-09 16:07 UTC
[Rails] Mutable models based on dbfunctions or stored procs?
Is there any way that a model can be based on a stored procedure or function that so that it can return a set of data based on a parameter provided in either the controller, or s a variable in the model? That way you could: 1) Set the variable 2) Call find_all 3) Get a mutable set of results that takes better advantage of some of the advanced database features available? There are many times when SQL code is simply a better way to twist and turn data sets. (Olap transformations, speeding up joins in large tables by using temp tables, etc.) Best, Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060309/76ed392a/attachment-0001.html
Brian Corrigan
2006-Mar-13 15:55 UTC
[Rails] Mutable models based on dbfunctions or stored procs?
No response on this one.. I can hear someone saying "Go write it!" B ________________________________ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Brian Corrigan Sent: Thursday, March 09, 2006 11:07 AM To: rails@lists.rubyonrails.org Subject: [Rails] Mutable models based on dbfunctions or stored procs? Is there any way that a model can be based on a stored procedure or function that so that it can return a set of data based on a parameter provided in either the controller, or s a variable in the model? That way you could: 1) Set the variable 2) Call find_all 3) Get a mutable set of results that takes better advantage of some of the advanced database features available? There are many times when SQL code is simply a better way to twist and turn data sets. (Olap transformations, speeding up joins in large tables by using temp tables, etc.) Best, Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060313/8cfe49ab/attachment.html