[DB-SIG] Experiences with DB-API2.0

Federico Di Gregorio fog@initd.org
20 Jun 2002 14:06:30 +0200

Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

On Thu, 2002-06-20 at 13:49, Horst Herb wrote:
> We wanted to make our project independend of database backends, or at lea=
> of database adapters as it is supposed to be truly multi platform and mos=
> adapters aren't.
> We thought DB-API was a great idea. That is, until we tried....:

IMHO, the target of the dbapi is *not* providing unchanged-source
portability across the differet drivers implementing it. it is just to
provide a common api: learn one, use many.

> 1.) Connection strings incompatible between the 3 "most popular" Postgres=
> adatpters - easy enough to fix, just a few "if....then..else"
> However, becomes tedious if you have hundreds of connections :-((

write a single wrapper function to do the connects
> 2.) Returned date formats incompatible despite all of them using mxDateTi=

write your own wrapper. or simpy choose the best-for-you adapter and
stick to it. even better, write an abstractio layer atop of dbapi and
release it to the public. you'll help other people solve the same
problems you're experiencing now.

> 3.) Frustrated, we gave up further tests for now.
> Are we doing something wrong or are the specifications that ambiguous tha=
> not even these simple issues can remain compatible?
> Am I rightfully disappointed or are changes already on the way?

hope this helps,

Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact        fog@debian.org
INIT.D Developer                                           fog@initd.org
              La felicit=E0 =E8 una tazza di cioccolata calda. Sempre. -- I=

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.0.7 (GNU/Linux)