On Monday 16 July 2007 17:18:04 Michael Bayer wrote: > On Jul 16, 2007, at 10:12 AM, svilen wrote: > > On Monday 16 July 2007 16:54:01 Michael Bayer wrote: > >> On Jul 16, 2007, at 9:20 AM, svilen wrote: > >>> on the "generative" line: > >>> - how would i prepack a select (or some other filtering) and > >>> give it to a query() _later_? > >>> e.g. i have some table.c.type == 'person', and i want to apply > >>> to several queries? > >>> i can store the expression, doing query.select(expr) each time. > >>> Any other way? e.g. store a select([expr])? > >> > >> you can store the select(), or the where clause, or the select > >> ().compile() object, or the query object itself since its > >> generative. which do you prefer ? > > > > hmmm. query is not available at that time. > > so far i store the expression only, although that is missing > > things like fold_equivalents=True. > > > > in the case of "polymorphic" outerjoins, i get all the id' > > columns of all joined tables (5 columns something.id for 5 level > > inheritance). Any way to get rid of them? > > well if you select() from it and fold_equivalents, yes. but > using just the join by itself, i think the code in 0.4 should be > *really* smart about not tripping over those at this point, no ? i/u will know when i switch to 0.4. as i have another "language" over the SA "language" itself (i.e. the API + how-to-use), sometimes u change that "language" too fast to follow it smoothly.
now it does not fall down, it just retrieves all them from db, redundantly. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---