Thread: [Informixdb-cvs] SF.net SVN: informixdb: [165] trunk/informixdb
Brought to you by:
chaese,
f-apolloner
From: <ch...@us...> - 2007-10-14 17:40:35
|
Revision: 165 http://informixdb.svn.sourceforge.net/informixdb/?rev=165&view=rev Author: chaese Date: 2007-10-14 10:40:37 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Since we publish server version information, it might be useful to publish version information about the client too, i.e. the ESQL version, for symmetry. Modified Paths: -------------- trunk/informixdb/ext/_informixdb.ec trunk/informixdb/setup.py Modified: trunk/informixdb/ext/_informixdb.ec =================================================================== --- trunk/informixdb/ext/_informixdb.ec 2007-10-13 22:07:31 UTC (rev 164) +++ trunk/informixdb/ext/_informixdb.ec 2007-10-14 17:40:37 UTC (rev 165) @@ -113,6 +113,7 @@ */ #define DEFERRED_ADDRESS(ADDR) 0 #include <signal.h> +#include "esqlver.h" /************************* Error handling *************************/ @@ -728,6 +729,8 @@ PyObject *binary_types; PyObject *dbms_name; PyObject *dbms_version; + PyObject *driver_name; + PyObject *driver_version; int can_describe_input; } Connection; @@ -881,6 +884,10 @@ "Name of the database engine." }, { "dbms_version", T_OBJECT_EX, offsetof(Connection, dbms_version), READONLY, "Version of the database engine." }, + { "driver_name", T_OBJECT_EX, offsetof(Connection, driver_name), READONLY, + "Name of the client driver." }, + { "driver_version", T_OBJECT_EX, offsetof(Connection, driver_version), READONLY, + "Version of the client driver." }, { NULL } }; @@ -3195,6 +3202,8 @@ self->dbms_name = PyString_FromString("Unknown"); self->dbms_version = PyString_FromString(version); } + self->driver_name = PyString_FromString(DRIVER_NAME); + self->driver_version = PyString_FromString(DRIVER_VERSION); return 0; } Modified: trunk/informixdb/setup.py =================================================================== --- trunk/informixdb/setup.py 2007-10-13 22:07:31 UTC (rev 164) +++ trunk/informixdb/setup.py 2007-10-14 17:40:37 UTC (rev 165) @@ -61,21 +61,31 @@ self.esql_parts.append('-static') # determine esql version - esqlver = re.compile(r"(IBM)?.*ESQL Version (\d+)\.(\d+)") + driver_name = "INFORMIX-ESQL" + driver_version = "Unknown" + esqlver = re.compile(r"(IBM)?.*ESQL Version ((\d+)\.(\d+)[^ ]*)") cout = os.popen(' '.join(self.esql_parts[0:1] + [ '-V' ]),'r') esqlversion = None for line in cout: matchobj = esqlver.match(line) if matchobj: matchgroups = matchobj.groups() - esqlversion = int(matchgroups[1] + matchgroups[2]) + driver_version = matchgroups[1].strip() + esqlversion = int(matchgroups[2] + matchgroups[3]) if matchgroups[0]=="IBM": # Assume ESQL 9.xx for any IBM branded CSDK. + driver_name = "IBM Informix-ESQL" esqlversion = 960 if esqlversion==None: esqlversion = 850 if esqlversion >= 900: self.esql_parts.append("-EDHAVE_ESQL9") + f = open(os.path.join("ext","esqlver.h"), "w") + f.write("""\ +#define DRIVER_NAME "%(driver_name)s" +#define DRIVER_VERSION "%(driver_version)s" +""" % locals()) + f.close() # find esql libs/objects cout = os.popen(' '.join(self.esql_parts + [ '-libs' ]),'r') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ch...@us...> - 2007-10-15 01:47:17
|
Revision: 166 http://informixdb.svn.sourceforge.net/informixdb/?rev=166&view=rev Author: chaese Date: 2007-10-14 18:47:21 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Let's assume for now that ESQL/C understands DESCRIBE INPUT iff it's version 9.40 or better. Modified Paths: -------------- trunk/informixdb/ext/_informixdb.ec trunk/informixdb/setup.py Modified: trunk/informixdb/ext/_informixdb.ec =================================================================== --- trunk/informixdb/ext/_informixdb.ec 2007-10-14 17:40:37 UTC (rev 165) +++ trunk/informixdb/ext/_informixdb.ec 2007-10-15 01:47:21 UTC (rev 166) @@ -1939,6 +1939,7 @@ (self->stype == 0 || (self->stype == SQ_EXECPROC && tdaOut->sqld > 0) ); if (self->has_output) { +$ifdef HAVE_DESCRIBE_INPUT; if (self->conn->can_describe_input) { struct sqlda *tda = NULL; EXEC SQL DESCRIBE INPUT :queryName INTO tda; @@ -1948,6 +1949,7 @@ _da_free(tda); } } +$endif; bindOutput(self); switch (self->is_hold + 2*self->is_scroll) { case 3: Modified: trunk/informixdb/setup.py =================================================================== --- trunk/informixdb/setup.py 2007-10-14 17:40:37 UTC (rev 165) +++ trunk/informixdb/setup.py 2007-10-15 01:47:21 UTC (rev 166) @@ -80,6 +80,8 @@ esqlversion = 850 if esqlversion >= 900: self.esql_parts.append("-EDHAVE_ESQL9") + if esqlversion >= 940: + self.esql_parts.append("-EDHAVE_DESCRIBE_INPUT") f = open(os.path.join("ext","esqlver.h"), "w") f.write("""\ #define DRIVER_NAME "%(driver_name)s" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ch...@us...> - 2007-10-15 01:56:03
|
Revision: 169 http://informixdb.svn.sourceforge.net/informixdb/?rev=169&view=rev Author: chaese Date: 2007-10-14 18:56:03 -0700 (Sun, 14 Oct 2007) Log Message: ----------- Version 2.5 coming soon Modified Paths: -------------- trunk/informixdb/README trunk/informixdb/informixdb.py trunk/informixdb/setup.py Modified: trunk/informixdb/README =================================================================== --- trunk/informixdb/README 2007-10-15 01:51:43 UTC (rev 168) +++ trunk/informixdb/README 2007-10-15 01:56:03 UTC (rev 169) @@ -1,7 +1,7 @@ INTRODUCTION ============ -This is informixdb 2.4, an Informix implementation of the Python +This is informixdb 2.5, an Informix implementation of the Python Database API. This release implements version 2.0 of the DB-API: http://www.python.org/topics/database/DatabaseAPI-2.0.html @@ -76,6 +76,9 @@ NEWS ==== +From 2.4 to 2.5: +- ... + From 2.3 to 2.4: - Implement 'named' parameter style to optionally bind query parameters by name @@ -279,6 +282,7 @@ 2.2 2006-03-26 Carsten Haese 2.3 2006-10-01 Carsten Haese 2.4 2006-12-02 Carsten Haese +2.5 TBD Carsten Haese -- Carsten Haese <ch...@us...> Modified: trunk/informixdb/informixdb.py =================================================================== --- trunk/informixdb/informixdb.py 2007-10-15 01:51:43 UTC (rev 168) +++ trunk/informixdb/informixdb.py 2007-10-15 01:56:03 UTC (rev 169) @@ -46,7 +46,7 @@ http://www.python.org/peps/pep-0249.html """ -version = "2.4" +version = "2.5" class Row(object): """Helper class for cursors whose row format is ROW_AS_OBJECT.""" Modified: trunk/informixdb/setup.py =================================================================== --- trunk/informixdb/setup.py 2007-10-15 01:51:43 UTC (rev 168) +++ trunk/informixdb/setup.py 2007-10-15 01:56:03 UTC (rev 169) @@ -219,8 +219,8 @@ DistributionMetadata.download_url = None setup (name = 'InformixDB', - version = '2.4', - description = 'InformixDB v2.4', + version = '2.5', + description = 'InformixDB v2.5', long_description = \ "InformixDB is a DB-API 2.0 compliant interface for IBM Informix\n" "databases.", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ch...@us...> - 2007-10-16 03:26:27
|
Revision: 175 http://informixdb.svn.sourceforge.net/informixdb/?rev=175&view=rev Author: chaese Date: 2007-10-15 20:26:29 -0700 (Mon, 15 Oct 2007) Log Message: ----------- document new features, set release date Modified Paths: -------------- trunk/informixdb/README trunk/informixdb/doc/manual.txt Modified: trunk/informixdb/README =================================================================== --- trunk/informixdb/README 2007-10-16 03:08:54 UTC (rev 174) +++ trunk/informixdb/README 2007-10-16 03:26:29 UTC (rev 175) @@ -77,8 +77,12 @@ ==== From 2.4 to 2.5: -- ... - +- Compatibility with CSDK 3.00 +- Ability to manually interrupt or automatically time out SQL execution +- Proper binding of boolean parameters in WHERE clauses +- Make version information about server and client available +- Various bug fixes + From 2.3 to 2.4: - Implement 'named' parameter style to optionally bind query parameters by name @@ -284,7 +288,7 @@ 2.2 2006-03-26 Carsten Haese 2.3 2006-10-01 Carsten Haese 2.4 2006-12-02 Carsten Haese -2.5 TBD Carsten Haese +2.5 2007-10-16 Carsten Haese -- Carsten Haese <ch...@us...> Modified: trunk/informixdb/doc/manual.txt =================================================================== --- trunk/informixdb/doc/manual.txt 2007-10-16 03:08:54 UTC (rev 174) +++ trunk/informixdb/doc/manual.txt 2007-10-16 03:26:29 UTC (rev 175) @@ -3,8 +3,8 @@ ========================== :Authors: Daniel Smertnig and Carsten Haese -:Version: informixdb 2.4 -:Date: 2006-12-02 +:Version: informixdb 2.5 +:Date: 2007-10-16 :Homepage: `InformixDB on Sourceforge`_ .. contents:: InformixDB @@ -379,6 +379,27 @@ `value` is the number of rows by which you want to scroll from the current row. +Interrupting Queries +-------------------- +`(new in version 2.5)` + +Cursor objects provide two mechanisms for interrupting long-running queries, +configurable with the attributes ``sqltimeout`` and ``sqlinterrupt``. +``sqltimeout`` is an integer that specifies how many milliseconds a query is +allowed to take. If a query takes longer than that, it is automatically +aborted. If ``sqltimeout`` is zero, no timeout is in effect and queries are +allowed to run indefinitely. + +``sqlinterrupt`` is a boolean attribute that indicates whether interrupt +signals during query execution interrupt the query. Note that turning this +feature on disables Python's handling of interrupt signals while queries are +executed. + +Connection objects have ``sqltimeout`` and ``sqlinterrupt`` attributes that +set the defaults for the corresponding attributes of any cursor objects +that the connection object creates. By default, ``sqltimeout`` is zero, +and ``sqlinterrupt`` is False. + Transactions ============ @@ -643,7 +664,33 @@ `Connection` object's messages attribute, and if the error is an actual error (i.e. not of type `Warning`), an exception is raised. +Inspecting Version Numbers +========================== +Occasionally it may be useful to inspect the version numbers of the database +engine, the ESQL/C driver, or of InformixDB itself. The following version +information is available at runtime: +Module-level attribute: + + * ``version``: The version number of InformixDB itself. + (`new in version 2.3`) + +Versions 2.0 through 2.2 didn't provide any version information. If you +have an installation of InformixDB that doesn't have a ``version`` attribute, +you should probably upgrade, since you're missing out on a lot of features +and bug fixes. + +Connection attributes (`new in version 2.5`): + + * ``dbms_name``, ``dbms_version``: The name and version number of the + database engine. For older engines such as Standard Engine, the name can + not be determined and the string "Unknown" is returned instead. + + * ``driver_name``, ``driver_version``: The name and version number of the + ESQL/C installation with which InformixDB was compiled. The name is either + "INFORMIX-ESQL" or "IBM Informix-ESQL" + + .. _InformixDB on Sourceforge: http://informixdb.sourceforge.net/ .. [#pep249] http://www.python.org/peps/pep-0249.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ch...@us...> - 2007-12-21 16:22:24
|
Revision: 178 http://informixdb.svn.sourceforge.net/informixdb/?rev=178&view=rev Author: chaese Date: 2007-12-21 08:22:29 -0800 (Fri, 21 Dec 2007) Log Message: ----------- Add build hints Modified Paths: -------------- trunk/informixdb/README trunk/informixdb/setup.py Modified: trunk/informixdb/README =================================================================== --- trunk/informixdb/README 2007-10-16 13:19:05 UTC (rev 177) +++ trunk/informixdb/README 2007-12-21 16:22:29 UTC (rev 178) @@ -23,7 +23,12 @@ This distribution uses Python distutils to build and install the informixdb module. It requires Python 2.2 or later. +To compile InformixDB, you need to have Informix ESQL/C installed. ESQL/C +is included with the Informix Client Software Development Kit (Informix CSDK), +which is available free of charge at +http://www.ibm.com/software/data/informix/tools/csdk/ . + In a hurry? ----------- Modified: trunk/informixdb/setup.py =================================================================== --- trunk/informixdb/setup.py 2007-10-16 13:19:05 UTC (rev 177) +++ trunk/informixdb/setup.py 2007-12-21 16:22:29 UTC (rev 178) @@ -102,9 +102,15 @@ esql_config.append(token) ret = cout.close() if ret != None: - raise DistutilsSetupError, \ - "\nCan't find esql. Please set INFORMIXDIR correctly." + raise DistutilsSetupError, """\ +Can't run esql. Please make sure that: +* You have the Informix CSDK installed, +* INFORMIXDIR is set to where Informix CSDK is installed, and +* esql is in your PATH. +See the README for build requirements. +""" + if get_platform()=="win32": for arg in esql_config: if arg.endswith('.lib'): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |