On 29/04/11 5:30 AM, Dan Kubb (dkubb) wrote:
Kane,

Why would I want to do this? Did I mention that we have a very big
application? Some or our joins combine many datamapper query objects
with intersection, or, and ... Very ofter postgres is fussy about such
things as the order of clauses, sub-selects, requirements in the where
clause. We are having performance issues related to this fussiness,
and because we do test driven development, we would like to match our
queries to assure no regressions as our code changes or we update
gems.

What if there were Query#to_sql and Collection#to_sql methods? I've
resisted a bit in the past, but I'd be willing to put them in to aid
debugging and if it helped get some feedback on SQL generation.
I don't have any specific thoughts on the interface, but *something* in the public interface for this would be ace. We are using this currently in the case where we don't want to take the speed hit of instantiating DM objects and just want the raw structs for results.

Xavier

--
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en.

Reply via email to