Re: Oracle driver
Jacob Smullyan <[email protected]> Mon, 30 May 2005 12:37:54 -0400
| Newsgroups | gmane.comp.web.skunkweb |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 30, 2005 at 11:03:32AM +0100, Hamish Lawson wrote: > Is it worth my while trying to write a Oracle driver for PyDO 2, or is > this already in the pipeline? I haven't started it, the main stumbling block for me being getting Oracle up and running in my environment. It would indeed be very welcome! > I see that the manual for PyDO 1 outlines > what's required of a driver; is there an updated spec for PyDO 2? Not as such at the moment. But there is a base class in dbi.py, and you just need to subclass it and fill in the blanks. The drivers are pretty simple, simpler than for PyDO1 (except for the introspection support, where the corresponding code in PyDO1 would be the genscripts). In a nutshell, you need to create a subclass of operators.BindingConverter that handles any special conversion requirements that you have (if your dbapi driver needs to be taught how to handle a particular datatype in a bind variable). (The code for this at the moment in the various drivers is a bit messy.) Then you subclass dbi.DBIBase and override getSequence, listTables, describeTable, and anything else you need to (psycopgconn has to override execute, for instance). > It's my understanding that the Python-Oracle community now prefers > cx_Oracle over DCOracle2. I'd therefore propose including support for > cx_Oracle. I guess we'd probably still want to support DCOracle2 but is > there any need to continue supporting the older DCOracle? If cx_oracle is preferred, I'd start there. Supporting DCOracle2 would be nice, but it doesn't seem absolutely essential at this point. (We're only supporting one postgresql driver at the moment, for instance.) I would drop DCOracle completely. j -- Jacob Smullyan
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCm0FiuqamFyFXXLIRAqEKAKCBut5IboZQnnCWVx2rPKEDHBW34QCeObBB q7kh8daBmIKI/VZLRxMy4Z8= =SBBI -----END PGP SIGNATURE-----