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

Federico Di Gregorio fog@initd.org
20 Jun 2002 14:27:11 +0200


--=-DVBkBoZ++YYKAmbCZ0EJ
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2002-06-20 at 14:09, Tom Jenkins wrote:
> Hi Federico,
>=20
> On Thu, 2002-06-20 at 08:06, Federico Di Gregorio wrote:
> > On Thu, 2002-06-20 at 13:49, Horst Herb wrote:
> > > We wanted to make our project independend of database backends, or at
> > least=20
> > > of database adapters as it is supposed to be truly multi platform and
> > most=20
> > > adapters aren't.
> > >=20
> > > We thought DB-API was a great idea. That is, until we tried....:
> >=20
> > 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.
>=20
> hrmmm, that's interesting opinion, but isn't it contradictory?  a common
> api but yet you have to change source code to switch between drivers?

if you use the LIMIT keyword in postgresql, your code won't be portable
to other adapters anyway. SQL shall be standard but too many backends
implements their own extensions, not to talk about system tables, etc.

the best thing you can do is, imho, build a layer above the dbapi, but
that will force you to use only the mcd subset of sql available to all
backends.

> please don't take that as a flame, you (should) know that i have utmost
> respect for you.

no flame, sure ;)

--=20
Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact        fog@debian.org
INIT.D Developer                                           fog@initd.org
                           Don't dream it. Be it. -- Dr. Frank'n'further

--=-DVBkBoZ++YYKAmbCZ0EJ
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)

iD8DBQA9EcofvcCgrgZGjesRAg4AAJ4+XsEqfC5V65C/iGrFIrk/oiCDhgCgufbO
fCayHRfR1vVoG3MfRL6MMws=
=AIBb
-----END PGP SIGNATURE-----

--=-DVBkBoZ++YYKAmbCZ0EJ--