[Rails-core] Re: ActiveRecord Refactoring

2007-02-26 Thread Dr. Ernie Prabhakar
Hi Zach, On Feb 26, 2007, at 3:15 PM, zdennis wrote: >> I like Ernie's suggestion of a SqlStatement-like object, or even >> better, >> settling on some duck-typing conventions for sql-like strings. >> >> SqlString < String could also hold its bind variables. The >> database adapter >> could t

[Rails-core] Re: ActiveRecord Refactoring

2007-02-26 Thread zdennis
On Feb 25, 5:21 pm, "Jeremy Kemper" <[EMAIL PROTECTED]> wrote: > On 2/25/07, zdennis <[EMAIL PROTECTED]> wrote: > > > There seems to be two ways to handle query generation which are better > > then the existing methods. > >1 - Generate queries inside the adapters > >2 - Register queries to

[Rails-core] Re: ActiveRecord Refactoring

2007-02-26 Thread Tom Ward
> I like Ernie's suggestion of a SqlStatement-like object, or even better, > settling on some duck-typing conventions for sql-like strings. > > SqlString < String could also hold its bind variables. The database adapter > could translate that to whatever native support for bound parameters, even

[Rails-core] Re: ActiveRecord Refactoring

2007-02-25 Thread Jeremy Kemper
On 2/25/07, zdennis <[EMAIL PROTECTED]> wrote: > > There seems to be two ways to handle query generation which are better > then the existing methods. >1 - Generate queries inside the adapters >2 - Register queries to be associated with certain adapters. > > Currently I prefer #2 because it

[Rails-core] Re: ActiveRecord Refactoring

2007-02-25 Thread zdennis
On Feb 24, 8:36 am, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > On 2/23/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > > > Starting Monday I'll be working for myself and one of the things I'm > > > looking forward to is working on ActiveRecord more. > > > Congratulations, it's a bu

[Rails-core] Re: ActiveRecord Refactoring

2007-02-25 Thread zdennis
On Feb 23, 3:59 pm, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: [snip] > We've spoken about this several times in the past, and it's still one > of our goals for the rails 2.0 release.The query generation code > is kinda ugly, and frankly a lot of it is in the wrong place. > > We should b

[Rails-core] Re: ActiveRecord Refactoring

2007-02-24 Thread Michael Koziarski
On 2/25/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote: > On 2/23/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > > Starting Monday I'll be working for myself and one of the things I'm > > > looking forward to is working on ActiveRecord more. > > > > Congratulations, it's a bunch of fun :)

[Rails-core] Re: ActiveRecord Refactoring

2007-02-24 Thread Dr. Ernie Prabhakar
On Feb 24, 2007, at 5:36 AM, Mislav Marohnić wrote: > On 2/23/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > Starting Monday I'll be working for myself and one of the things I'm > > looking forward to is working on ActiveRecord more. > > Congratulations, it's a bunch of fun :) > > Will the

[Rails-core] Re: ActiveRecord Refactoring

2007-02-24 Thread Mislav Marohnić
On 2/23/07, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > Starting Monday I'll be working for myself and one of the things I'm > > looking forward to is working on ActiveRecord more. > > Congratulations, it's a bunch of fun :) Will the change make the Abstract Adapter really abstract whil

[Rails-core] Re: ActiveRecord Refactoring

2007-02-23 Thread Andrew Kaspick
I'd like to see the condition methods moved out of ActiveRecord and into a more general location... condition_block? evaluate_condition They currently reside in validations.rb The functionality they provide can be used nicely in ActionController and possibly other places where class methods acc

[Rails-core] Re: ActiveRecord Refactoring

2007-02-23 Thread Michael Koziarski
> Starting Monday I'll be working for myself and one of the things I'm > looking forward to is working on ActiveRecord more. Congratulations, it's a bunch of fun :). > I've written and > released some ActiveRecord extensions/plugins [0] and as well as > posted some thoughts on ActiveRecord's mo