On Apr 6, 2006, at 11:12 PM, Daniel Miller wrote:
# 10. A shortcut for when you want a particular ConnectionProxy
(or set of ConnectionProxies) to go into effect corresponding to a
particular Session. This ConnectionProxy gets used for all
operations with this Session which involve the given
ConnectionProxy's underlying engine:
e = create_engine('...')
conn = e.connection()
sess = Session(connections=[conn])
Why multiple connections? How will it decide which connection to
use? Or are you thinking of multicasting the SQL to all
connections? :)
multiple connections for a multi-engine configuration. you might
have noticed QVX's examples where hes talking to an oracle and a
mysql database at the same time; some other people have asked about
this too. at my last job we always had to talk to two or three
separate Oracle connections at the same time. If I load a bunch of
objects from all three, a single Session has to be able to commit
them all to their respective databases, mappers need to load from the
correct DB's. If we now want to add the ability to have explicit per-
session connections declared externally to the Session and the
mappers, there has to some method of matching them all up to what
tables they belong to. I am looking at something like the
session.bind(...) approach you suggested. this was one reason I
liked the idea of Tables that are connected to their appropriate
databases up front, it made this kind of thing much easier.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users