On Aug 26, 2008, at 9:56 AM, Cecil Westerhof wrote:
> And this does what it should do. So I expect that the engine is > fetched out of Gewicht. > > First I had: > for row in engine.execute('SELECT MIN(gewicht) AS gewicht ' > ', MIN(vet) AS vet ' > ', MAX(water) AS water ' > ', MAX(spieren) AS spieren ' > 'FROM gewicht '): > but because I want it to have the code engine independend I changed > that to: > for row in sa.select([sa.func.min(Gewicht.gewicht) > , sa.func.min(Gewicht.vet) > , sa.func.max(Gewicht.water) > , > sa.func.max(Gewicht.spieren)]).execute(): > The problem with this is that I now need to use row[0] instead of > row.gewicht. Is there a way to use row.gewicht also in the case > sa.select? > > Is this a good way of doing things, or should I work with severall > engines? I dont quite understand how the difference between Query and select() has an impact on using a single or multiple Engine objects. So I'll sum up the two "multiple databases" approaches. "Vertical partitioning" means that different tables reside in different engines, and "horizontal partitioning", also known as "sharding", means that the same tables reside in multiple engines, but individual rows are spread across multiple databases. SQLA has support for both of these paradigms which are described (brielfy) at http://www.sqlalchemy.org/docs/05/session.html#unitofwork_partitioning . Not sure if this is what you're looking for. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---