[Zope-DB] Per-user connections
Yves Bastide
Yves.Bastide@irisa.fr
Wed, 04 Dec 2002 20:49:14 +0100
Hi,
For reasons best left in the dark, I'd like to have per-user database
connections. Since this is in an application where (most of) the SQL is
already done in a module, I see two ways of doing:
* create a Connection object, stored in the Sessin, when the user is
authentified; to use ZSQL methods, subclass the DA to take the
Connection parameter in __call__
* don't count on using ZSQL methods; use a class derived from the one I
use outside of Zope, and from Shared.DC.ZRDB.TM's TM to know when to
commit/rollback.
Can people familiar with Zope's machinery comment on these approaches
(or give me a better one)?
Thanks!
yves