On 3/31/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Mar 30, 2007, at 1:06 PM, Gaetan de Menten wrote: > > > 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) ...)
That's approximately what I did in my patch with the new "params" keyword argument, except I only implemented the "set" operation, not the add operation on the params. Anyway, what can/should I do to get this included? Do you have any advice/pointers on how to do the same for eager attributes? (or will you implement it yourself?) -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---