DCOracle2 1.3 beta availabe
DCORACLE2
DCOracle2 is Zope Corporation's second generation of its python bindings for Oracle. DCOracle2 is written to use the OCI 8 API, not the OCI 7 API that DCOracle uses, giving DCOracle2 compatibility with more advanced features in newer generations of the Oracle software.
RELEASE
DCOracle2 1.3 beta is now released, available at http://www.zope.org/Members/matt/dco2 in ZIP and tar.gz formats. This release is a unified source/binary distribution; the install.py
script will attempt to copy the proper binary in place for execution on your system.
I expect this to be a stable release, but I released 1.2 as "stable" when in fact it had a glaring LOB bug.
CHANGES
Please see the changelog.
Specific changes include:
- Add Uwe Hoffman's long fetch status code patch
- Fix LOB copy routine to set the indicator to 0, because it was allocated as -1 (NULL) and that turns lobs into temporary LOBs (Collector #72)
- Fix Date creation routine to take all arguments, rather than just timestamps; only simple error checking is done on date ranges, negative dates are not allowed, month and day must be 1-12 and 1-31 if year is > 0 etc. Computation of "valid" dates (ie leap year, end of month computation) is not done. (Collector #74)
- Add __iter__ and next() support on cursors, from Gene Cash. Raises a IndexError on pythons under 2.2 when next() is called and no more results are in the result set.
- Fix coerce function in OracleDates to Py_INCREF arg 2 when successful coercion occurs, arg 2 is otherwise untouched.
- Date conversion to int will use time only for dates with a year of zero (presumed to be just times)
- Pad binding arrays with an extra record, just to be safe
- Change SP.py to use its own version of TM instead of Shared.DC.ZRDB.TM, because the other version stores volatile attributes in nonvolatile names.
- Change numeric conversion to use OCINumber calls vs strings The define NATIVE_NUMERIC controls use of the OCI numeric calls.
- Change scaling for cases when scale and precision are 0 or scale = 0 and precision = 38. In these two cases, the result is presumed to be an INT. The STRICT_SCALE define controls this behavior (if STRICT_SCALE is 1, then the old behavior of scale=0 precision=0 will use floats, and scale=0 precision=38 will use longs).
- Add BFILE and CFILE support to LOBs, with getFileName and setFileName functions to associate external lobs, and fileExists() to determine if the LOB external file exists.
- Make the Date output conversion appropriately bias for local time for doing its integer computation. Note that the function DateFromTicks() presumes that ticks is in GMT; as such, the date generated will NOT match local time (well except in the UK, half the year).
- Add NativeNumeric detection for LOB parameter binding of type SQLT_NUM on OUT parameters; make it use SQLT_VNU for new native numeric support if its available.
CONTENTS
- DCOracle2 source
- DCOracle2 binaries for Oracle 8i (Windows, Solaris, Linux)
- ZOracleDA (the Zope Database Adapter)
- DCOracleStorage (an Oracle Storage for Zope)
INSTALLATION
After unpacking, either run install.py
to copy an appropriate binary file from the binaries directory to the DCOracle2 directory, or type make
to attempt to make a new binary (unix only).
For use as ZOracleDA, copy the DCO2 directory to lib/python/Products/ZOracleDA
(renaming the directory from DCO2 to ZOracleDA).
AVAILABILITY
DCOracle2 is available from http://www.zope.org/Members/matt/dco2 immediately.
BUG REPORTING
Please use the issue tracker at http://www.zope.org/Members/matt/dco2/Tracker to report any issues with DCOracle2.