[Zope-DB] Re: [Zope-dev] SQLite as a Light DB component for Zope and Python

Gerhard Häring gerhard.haering@gmx.de
Wed, 3 Apr 2002 03:30:47 +0200

* William Trenker <wtrenker@shaw.ca> [2002-04-02 12:17 -0800]:
> If you look into the C interface you will find it is almost trivial to
> build a Python extension module and "bring" SQLite into the realm of
> Python scripting.

Yes, it's only a matter of an hour or two to get that running as a C
extension. Then comes the testing and bugfixing, which I haven't done
because I somehow lost interest.

> SQLite also has it's own C interface for adding expression 
> functions and aggregates to the SQL syntax.  I expect this could be hooked 
> into Python through the Python extension interface as a callback.

Sure, that's what I've done. If anybody's interested, I can mail her/him
the work I started. I've already sent it to somebody who asked about
such a thing on python-list he indicated he wants to finish it.

Creating a DB-API wrapper around that simple C-extension is really quite
a different thing. Getting this right would require some more effort
IMO. Probably easiest is to just hack an existing DB-API implementation
until it fits.

If anybody's looking for Gadfly replacements, there's also MkSQL on
Gordon McMillan's site, which is a (alpha) DB-API wrapper around

> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.343 / Virus Database: 190 - Release Date: 3/22/02

How ridiculous.