[Rails-core] Re: don't reload in dev mode

2010-07-09 Thread alkondrate...@gmail.com
On Jul 8, 9:29 am, Konstantin Haase wrote: > On Jul 8, 2010, at 18:19 , Xavier Noria wrote: > > > On Thu, Jul 8, 2010 at 10:29 AM, Konstantin Haase wrote: > > >> I'm currently rewriting quite a bit of it. Planning to write a post here > >> or on a blog soon to summarize what I'm changing. When

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Jarl Friis
Jarl Friis writes: > Dear all great developers. > > I wonder if there is any work being done or thoughts being shared > regarding prepared SQL statements. OK. Let that be it (thanks Rodrigo Rosenfeld Rosas). I am interested in any comments on work/thoughs regarding prepared statements. This was

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Jarl Friis
Hi Norman. Thanks for comments. Norman Clarke writes: > On Thu, Jul 8, 2010 at 07:58, Rodrigo Rosenfeld Rosas > wrote: >> Looking at the title, it seems he is suggesting the use of Prepared >> Statements in ActiveRecord, which seems pretty reasonable, even if storing >> images on database is n

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Rodrigo Rosenfeld Rosas
Em 08-07-2010 08:17, Jarl Friis escreveu: Jarl Friis writes: Dear all great developers. I wonder if there is any work being done or thoughts being shared regarding prepared SQL statements. OK. Let that be it (thanks Rodrigo Rosenfeld Rosas). I am interested in any comments on work/

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Ernie Miller
On Jul 9, 2010, at 12:37 PM, Rodrigo Rosenfeld Rosas wrote: > > In Sequel, it is possible to call a "sql" method to see the generated SQL > from a Sequel object. I missed this in ActiveRecord for a long time. I guess > this is possible for ActiveRecord in Rails 3 since it is using Arel which >

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Rodrigo Rosenfeld Rosas
Em 09-07-2010 16:47, Ernie Miller escreveu: On Jul 9, 2010, at 12:37 PM, Rodrigo Rosenfeld Rosas wrote: In Sequel, it is possible to call a "sql" method to see the generated SQL from a Sequel object. I missed this in ActiveRecord for a long time. I guess this is possible for ActiveRecord i

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Ernie Miller
On Jul 9, 2010, at 6:57 PM, Rodrigo Rosenfeld Rosas wrote: > > Is it difficult to add some method to ActiveRecord that displays exactly the > SQL that will be run, or that would be run if eager loading was set? I mean, > maybe some methods like "eager_sql" and "lazy_sql"? I don't know > Active

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Rodrigo Rosenfeld Rosas
Em 09-07-2010 20:18, Ernie Miller escreveu: On Jul 9, 2010, at 6:57 PM, Rodrigo Rosenfeld Rosas wrote: Is it difficult to add some method to ActiveRecord that displays exactly the SQL that will be run, or that would be run if eager loading was set? I mean, maybe some methods like "eager_sq

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Ernie Miller
On Jul 9, 2010, at 7:33 PM, Rodrigo Rosenfeld Rosas wrote: > > If you decide to write this helpful method, I would be extremely glad! I'm > already glad you took the path to integrate > Arel in ActiveRecord and provided a much better interface to AR anyway ;) Just a clarification -- I apprecia

Re: [Rails-core] Prepared SQL statements

2010-07-09 Thread Ernie Miller
On Jul 9, 2010, at 7:33 PM, Rodrigo Rosenfeld Rosas wrote: >> I don't think it would be terribly difficult, no -- it'd basically be doing >> arel.to_sql or a partial version of find_with_associations depending on the >> result of eager_loading? that looks something like this and sticking it in