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?

--~--~---------~--~----~------------~-------~--~----~
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