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

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


--=-qb5xDeIdeBZgtiaWNPJL
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=
st=20
> of database adapters as it is supposed to be truly multi platform and mos=
t=20
> adapters aren't.
>=20
> 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=
=20
> 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
=20
> 2.) Returned date formats incompatible despite all of them using mxDateTi=
me

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.
>=20
> Are we doing something wrong or are the specifications that ambiguous tha=
t=20
> not even these simple issues can remain compatible?
> Am I rightfully disappointed or are changes already on the way?

hope this helps,
federico

--=20
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=
o

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA9EcVGvcCgrgZGjesRAvRyAKCi1LQBqLyIHAxq7xSj53W3+qd9wgCgoat9
1BeufHBXLbnxjrYBPofKjko=
=Ep/T
-----END PGP SIGNATURE-----

--=-qb5xDeIdeBZgtiaWNPJL--