It's certainly possible to support prepared statements for a subset of
our api, and i'd expect people will provide patches and benchmarks
once the adapters make it feasible.

 Just don't expect them to provide some magic performance boosts on
all adapters. It's entirely possible that the code complexity would
outweigh any performance improvements :).

On 2/28/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 2/26/07, Michael Koziarski <[EMAIL PROTECTED]> wrote:
> >
> >
> > Foo.find(:all, :conditions=>["bar = ?", bar)
> >
> > Without changing our API there's no way we could specify the data type
> > of a parameter to a prepared statement.
>
>
> Foo.find(:all, :conditions => { :bar => bar })
>
> Now we can, because AR knows about the "bar" column and its type. AR
> adapters could use prepared statements when applicable. Executes could fall
> back to plain queries when execution would suffer (like in your example).
>
> Or am I overseeing something?
>
> >
>


-- 
Cheers

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to