[development] Have you ever laughed fate in the face?

Chad Phillips -- Apartment Lines chad at apartmentlines.com
Fri Jul 21 15:26:28 UTC 2006


On Jul 21, 2006, at 3:52 AM, Derek Wright wrote:

>> Adding an extra where-clause to all queries is perfectly valid if  
>> that is the best solution from a technical point of view.  We  
>> shouldn't go with a solution that is sub-optimal, and avoid a  
>> superior solution just because it is a lot of work.  That sort of  
>> decisions tend to backfire in the long run.
>
> 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...

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.

the efficiency argument i understand, but we really wouldn't know  
what we're giving up until we tested it.

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.  :)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060721/bfcbe4ce/attachment.htm


More information about the development mailing list