[Zope3-dev] Re: Changing zope.app.rdb to better support sqlos
Stephan Richter
srichter at cosmos.phy.tufts.edu
Mon Nov 7 09:14:34 EST 2005
On Monday 07 November 2005 08:52, Brian Sutherland wrote:
> On Thu, Nov 03, 2005 at 12:48:40PM +0100, Brian Sutherland wrote:
> > On Thu, Nov 03, 2005 at 12:08:09PM +0100, Andres Freund wrote:
> > > 4. Every database adapter has an own interface which inherits from the
> > > zope one. This would enable the use of normal zope adaption which i
> > > would prefer, but again every adapter which should be used together
> > > with sqlos has to be changed.
> >
> > This is also my slightly preferred option. It could work for mysql as
> > follows (/me waves hands rapidly):
> >
> > 1. zope.app.rdb define IMySQLZopeConnection which extends
> > IZopeConnection. IMySQLZopeConnection is just a marker interface.
> > 2. in sqlos register an adapter from IMySQLZopeConnection to sqlos to
> > the IZopeSQLConnection.
> > 3. in mysqldbda provide an implementation of IMySQLZopeConnection, i.e.
> > returns objects implementing IMySQLZopeConnection in place of
> > IZopeConnection
>
> So, this is the code I will commit to the mysqldbda (similar code may
> eventually make it's way into the other database adapters):
Please don't check this in yet, I want to review the problem before you do,
because I think specific interfaces are just nuts unless we have a very good
reason.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list