RE: Re: Rails SQL Server adapter

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 C.
Operations Manager
MGAM Systems, Inc.
1 Broadway Place
Schenectady, NY 12305
[email protected]
tel: 518-881-1121
fax: 518-881-1128
mobile: 518-727-6652

On 3/17/06, Brian C. [email protected] 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 T.
[email protected]
http://naeblis.cx/rtomayko/
http://lesscode.org/