[sqlalchemy] Best Practices for ORM vs SQL in this context

2008-09-14 Thread Marcus Cavanaugh
I often find myself wanting to do something like this: for address in user.addresses: if address.street == 123 Elm Street: # there's an address from this street, so do something break else: # do nothing; no addresses from that street That could also be accomplished with

[sqlalchemy] ShardedSession and id_chooser

2008-05-20 Thread Marcus Cavanaugh
Some of my tables (in a web application using Pylons) will eventually need to be partitioned to separate shards, but some tables won't. For example, imagine that I'd like to partition a Users table across 3 different databases, while leaving others just on one master database. I've read the