On Mar 30, 2007, at 1:06 PM, Gaetan de Menten wrote:

> On 3/26/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>>
>>> (and whether that be a .query() or Query() or SelectResults not big
>>> difference imo.)
>>>
>>
>> i vote Query().
>
> I tried to implement it but I couldn't do it the way I wanted to. The
> problem is: how do I construct a clause from a clause with bind
> parameters + a dictionary containing the values for said bind
> parameters? I've only seen bind parameters resolved at execution time.
> Is it possible to resolve them earlier? In the attached patch, I used
> a workaround which is to store the bind parameters in the query
> itself, and then use them whenever the query is executed.
>

i dont think its so terrible for the Query to shuffle along some bind  
params.  as sdobrev says you can have a "value" associated with a  
BindParamClause itself which will take effect too...if you were  
snatching the lazy clause from the LazyLoader, youd have to make a  
copy of the clause with new bind params and install the values there  
(since there could be many concurrent users of the same LazyLoader).   
but probably easier just to have the dict there, we can even make  
that part of Query (add_params(**params) ...)





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