$Id: README,v 1.2 1997/02/19 15:17:54 bertil Exp $ README for INFORMIX database extension for Python. Release 1.0 1997-02-19. -------------------------------------------------------------------- Software License -------------------------------------------------------------------- The informixdb is Copyright (c) 1997 by IV DocEye AB. By obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read, understood, and will comply with the following terms and conditions: Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ======= This is the first of two parts of the update to Informixdb. This update adds support for date/datetime/interval. In the next update support will be added for arithmethic for the above. -Jayant Kelkar jkelkar@s-1.com or jayant@mindspring.com P.S. Bertil knows of this effort, he should be getting a mail with information on the first release. ======= INSTALL ======= For UN*X: See the Makefile for a UN*X case. For Windows: 1. Make sure Microsoft Visual C++ 4.x is installed. 2. Make sure Informix ESQL/C for Win32 is installed. 3. Extract and compile Python 1.4. 4. Place the following files in a subdirectory of Python distribution. dbi.c dbi.h ifxdbmodule.ec _informixdb.def _informixdb.mak 5. Process the .ec file with the ESQL/C preprocessor. > esql -e ifxdbmodule.ec Ths will generate a file named ifxdbmodule.c 6. In MSVC use "File->Open Workspace..." to open the file "_informixdb.mak" 7. In MSVC use "Build->Build _informixdb.dll" to build the DLL. NOTES ===== The API is defined by http://www.python.org/sigs/db-sig/DatabaseAPI.html In addition to that text: Objects dbiDate dbiRaw have the attribute 'value' for access of data. I.e. to put a blob into a file: >>> import informixdb >>> db = informixdb.informixdb("adatabase@somehost") >>> c = db.cursor() >>> c.execute("Some select statement") >>> r = c.fetchone() >>> aBlob = r[SomeIndex] >>> afile = open("SomeFile", "w+") >>> afile.write(aBlob.value) --------------------------^^^^^ >>> afile.close() Transactions: The module detects whether database is configured with log. If so, all operations are done within transactions. Connections: Multiple database connection is supported. This allows you to have more than one database object present in your application. The code handles connection switching on the fly, at a cost. (However, a switch occurs only when needed.) BEWARE: This do NOT, I repeat, NOT imply secure distributed database operations as each database is handled separately. In other words, transactions do not span over databases. __doc__ Will be added doc-strings in next release. 'callproc' method: Yet to be implemented ( and yet to be fully defined ). Certain DDL statements: According to the API-definition, upon successfull return from e.g. 'CREATE TABLE MUFFIN ...', a value of 1 shall be returned. This is currently the value 0. Database Methods and Attributes. According to the API-definition, the set of methods and attributes for Cursor Objects shall also exist for a Database Objects. This is fixed with a wrapper .py file. The true work is done in _informixdb.so/.sl/.dll. Multiple Row Insert According to the API-definition, arguments to Cursor Object method execute() can, for INSERT, be a sequence of sequences to allow for multiple inserts in one statement. This do not work. Will fix in comming release. FUTURE ====== 1) All deviations from API shall be fixed. However, method 'callproc' is yet to be defined in the API so this may take a while. 2) Changes indicated above shall be fixed. 3) Error reporting will be changed as the present implementation seems unable to correctly report ISAM errors. 4) datetime vs. date Not well done. I'm working on it. The DBAPI def leaves little room. datetime is poorly handled per se as well. Working on that too. 5) There are a few potential optimizations, that will save some run time, to be considered. MAINTAINER ========== Send complaints to me: Bertil_Reinhammar@ivab.se Send questions to: db-sig@python.org ACKNOWLEDGEMENTS ================ This module is based on work by Greg Stein and Michael Lorton when the were 'eShop'. Mr. Lorton wrote most of the current code. ---END