Forum: Ruby on Rails RE: Re: Rails SQL Server adapter

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9fc9f31415f9384fbe7262fa916e16f5?d=identicon&s=25 Brian Corrigan (Guest)
on 2006-03-17 18:28
(Received via mailing list)
Hey Ryan,

I asked this question awhile back, but any support planned for table
returning functions, or stored procedures?

I'm envisioning basically a mutable model class where you have 1 or more
instance variables defined (with default values) that are used in the
SQL queries as input parameters.  When you instantiate the class you can
specifically define these parameters or use the defaults, when you
access the class directly it just uses the defaults.

Since the columns returned should be the same (unless its an olap type
query which wouldn't be supported) I think this would generally be
compatible with active record.

This would really foster corporate adoption.  Personally, a lot of our
logic is in the stored procedures.  Yes, one can argue that this is not
a proper tiered design, but there simply is some logic BETTER done on
the SQL server.  Plus, you get the benefits of being able to optimize
complex queries and use temp tables.

Best,
B

---------------------------
Brian Corrigan
Operations Manager
MGAM Systems, Inc.
1 Broadway Place
Schenectady, NY 12305
brian.corrigan@mm-games.com
tel: 	  518-881-1121
fax: 	  518-881-1128
mobile: 518-727-6652
---------------------------
Abfc88b96ae18c85ba7aac3bded2ec5e?d=identicon&s=25 Ryan Tomayko (Guest)
on 2006-03-18 07:56
(Received via mailing list)
On 3/17/06, Brian Corrigan <brian.corrigan@mm-games.com> wrote:
> I asked this question awhile back, but any support planned for table
> returning functions, or stored procedures?

I personally don't have any plans for adding these but I'm also
struggling to allocate time for reviewing patches and running the unit
tests before releases :-/ In other words, don't take that as a no, I'm
just not actively developing the adapter. It sounds like you have a
pretty good idea of what you're looking for; how about throwing it in
a plugin and letting people play with it? That's probably the quickest
path into the core right now. It's silly easy to extend the adapters
with custom functionality like this using a plugin.

> This would really foster corporate adoption.  Personally, a lot of our
> logic is in the stored procedures.  Yes, one can argue that this is not
> a proper tiered design, but there simply is some logic BETTER done on
> the SQL server.  Plus, you get the benefits of being able to optimize
> complex queries and use temp tables.

I like to believe that Rails is sufficiently extensible to allow
people with all different constitutions to use Rails the way they find
best. There's certainly places where I've paved my own Golden Path
based on context, difference of opinion, etc. Stored procedures isn't
one of them but I don't see why they couldn't be.

--
Ryan Tomayko
                                 rtomayko@gmail.com
                                 http://naeblis.cx/rtomayko/
                                 http://lesscode.org/
This topic is locked and can not be replied to.