<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Jul 21, 2006, at 3:52 AM, Derek Wright wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Adding an extra where-clause to all queries is perfectly valid if that is the best solution from a technical point of view.<SPAN class="Apple-converted-space"> </SPAN>We shouldn't go with a solution that is sub-optimal, and avoid a superior solution just because it is a lot of work.<SPAN class="Apple-converted-space"> </SPAN>That sort of decisions tend to backfire in the long run.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">if we're going to generate a patch that touches "thousands of queries" and test the results, the "best solution from a technical point of view" seems to be to port all said queries to some kind of query building interface so we never have to touch them again for this kind of thing...</FONT></P> </BLOCKQUOTE><BR></DIV><DIV>i couldn't agree more. my understanding is that we don't have that at the moment because SQL queries are easier to read in the code, and possibly because it's a little more efficient. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>the efficiency argument i understand, but we really wouldn't know what we're giving up until we tested it. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>the readability argument is shortsighted in my opinion--it puts us in this kind of position, where somebody has to muck through all the code and fix everything by hand, which seems unnecessary--not to mention more bug-prone and less flexible. in this sense we're really talking about a format change, and i think developers would have little problem getting used to a new way of reading the queries in code. not to mention that if you want to see what the final SQL looks like, just pop open the devel module and turn on the query print thing. :)</DIV><BR><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>