[Zope-DB] Newbie DBAptapter makie want ...

Gerhard Häring gerhard@bigfoot.de
Mon, 24 Sep 2001 07:21:00 +0200


Hi!

Please forgive the silly subject ;-)

I'd like to develop a new database adapter for a Python database module
(pyPgSQL). Being quite a newbie at Zope doesn't make it easier, but I like
challenges :-)

I think that there are a few people on this list who have experience in writing
such an adapter. I'd appreciate if you would share some of them with me.

My first problem is that I haven't found any specification for such a beast. In
Java, I would simply implement a well documented interface. Am I right that no
such thing exists? Or have I overlooked it? Is grabbing an existing DA and
hacking it until it fits really the only possibility?

My second question: How do I debug such a beast? In my prototype, I build a
connection, then a ZSQLMethod that uses the connection, then I "test" the
connection, until all errors in my DA modules are gone. Fine. Now I get a very
obscure error in ZODB. But only when the first column is an integer.

In case this rings any bells: an UnpickleableError is raised. When I try to
find out which type cannot be pickled, dont't laugh!, I get: "Could not pickle:
UnpickleableError"

Is there a way to build an automated testsuite for a database adapter?

Thanks,

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))