[DB-SIG] ODBC Access
Frank McGeough" <firstname.lastname@example.org
Sun, 23 Jan 2000 14:52:46 -0500
I've built a fairly full featured odbc access layer for my C++
programmers. I've spent a lot of time optimizing it and dealing with
the idiosyncracies of various odbc drivers. I'd like to extend it to
the Python folk. I looked at the some of the extensions that are
included with Python like the odbc.pyd in win32 land. All the
extensions I've examined have been pretty messy 'C' code. I get the
general idea --- there seems to be a table of function pointers and
everything seems to be a PyObject --- but I was wondering if there are
more extensive samples of class libraries converted to extensions?
Also are there automated tools in this area? Where can I turn for help
in this process?
I have the following general set of classes:
CDBIDatabase (used to open up a particular data source)
CDBIConnection (obtained from a database. Can be more than one per
CDBITable (encapsulates the idea of a database table).
CDBIColumn (encapsulates the idea of a database column).
CDBISchema (description of a schema - made up of CDBIColumns)
CDBIForeignKey (description of fkey).
CDBIRow (a row of result information, made of up of an ordrered
collection of CDBIValue's)
CDBICursor (a db cursor - may be forward only or bi-directional).
CDBIValue (a database value obtained by executing some sql statement).
I've also provided a set of classes to wrap database types - like Blob
and String and DateTime. My class library doesn't seem to fit into dbi
either but that's a lesser consideration for my internal folk. Each of
my classes is coded as a reference counted interface/implementation. I
currently deliver this to the C++ programmers as Windows (win32) DLL.
Any help or pointers appreciated.