Michael Bayer wrote:
> On May 9, 2007, at 4:08 PM, Rick Morrison wrote:
>
>   
>> Hey Mike,
>>
>> I've really gotten to like the generative style of query building  
>> that the ORM layer uses, and I find myself developing a number of  
>> patterns that use that style to
>> good advantage.
>>
>> Today I found myself struggling with a query in the low-level SQL- 
>> API layer that the generative approach would make really easy -- is  
>> there a way to get the same kind of generative effect in the lower  
>> layers?
>>
>> Right now I'm kind of hacking something that uses copy.copy() on  
>> the select(), and that surprisingly seems to work, but makes me  
>> think there must be a better way.
>>
>>
>>     
>
> yeah i really should have just imitated Hibernate more closely when i  
> started this thing.
>   
Well, I can tell you that I am so glad SA does not have HQL (or does it ?).
> theres no technical reason generativeness couldnt be applied to  
> ClauseElements except for potential API messiness.  we do have  
> methods on select() that modify it, such as append_whereclause(),  
> order_by(),  and such...if they just returned "self", then you could  
> act more "generatively" with it, i.e. select(...).append_whereclause 
> ().order_by()..etc.
>
> then again, true "generativeness" would have simpler method names  
> like just "where()", "from()", etc. and I suppose those arent a big  
> deal to add.  
Generative select clauses would be awesome. append_whereclause always 
did sound slightly verbose to me.

Huy


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

Reply via email to