Thread: [Informixdb-cvs] informixdb/doc manual.txt,1.4,1.5
Brought to you by:
chaese,
f-apolloner
From: Carsten H. <ch...@us...> - 2005-10-22 18:35:19
|
Update of /cvsroot/informixdb/informixdb/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17930 Modified Files: manual.txt Log Message: Minor typo fixes and grammatical fixes to Daniel's excellent documentation. Thanks, Daniel :) Index: manual.txt =================================================================== RCS file: /cvsroot/informixdb/informixdb/doc/manual.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** manual.txt 22 Oct 2005 15:21:01 -0000 1.4 --- manual.txt 22 Oct 2005 18:35:06 -0000 1.5 *************** *** 49,53 **** forward all operations on the `Connection` object or any of its associated `Cursor` objects will raise an `InterfaceError`. A connection will also be ! closed when upon deallocation (this requires all `Cursor` objects which use the connection to be closed or deallocated first). --- 49,53 ---- forward all operations on the `Connection` object or any of its associated `Cursor` objects will raise an `InterfaceError`. A connection will also be ! closed upon deallocation (this requires all `Cursor` objects which use the connection to be closed or deallocated first). *************** *** 76,80 **** To pass in arguments for an SQL statement a sequence can be passed as second ! parameter to `execute`. The arguments can then be referenced either by ``numeric`` or ``qmark`` style:: --- 76,80 ---- To pass in arguments for an SQL statement a sequence can be passed as second ! parameter to `execute`. The arguments can then be referenced either using ``numeric`` or ``qmark`` style:: *************** *** 85,89 **** Care must be taken when passing in a single string as argument, since it ! would be interpreted as sequence, which is usually not what is intended:: >>> cursor.execute('SELECT * FROM names WHERE first=:1', 'dagobert') --- 85,89 ---- Care must be taken when passing in a single string as argument, since it ! would be interpreted as a sequence, which is usually not what is intended:: >>> cursor.execute('SELECT * FROM names WHERE first=:1', 'dagobert') *************** *** 118,122 **** ``1`` for InformixDB. ! - ``fetchall()``: Fetches all (remaining) rows and returns them as list. :: --- 118,122 ---- ``1`` for InformixDB. ! - ``fetchall()``: Fetches all (remaining) rows and returns them as a list. :: *************** *** 161,165 **** The `type_code` is a textual description of the column type and can be ! evaluated by comparing it with the global type objects defined by the `informixdb`-module (see `Database values`_):: --- 161,165 ---- The `type_code` is a textual description of the column type and can be ! evaluated by comparing it to the global type objects defined by the `informixdb`-module (see `Database values`_):: *************** *** 183,188 **** parameters multiple times. It takes a sequence of parameter-sequences as taken by `execute` as its second argument and executes the statement for ! each of the paramaters. Internally insert cursors for batch inserts, which ! can result in a huge performance boost, especially over a network:: >>> cursor.executemany("INSERT INTO names VALUES(:1,:2,:3)", --- 183,188 ---- parameters multiple times. It takes a sequence of parameter-sequences as taken by `execute` as its second argument and executes the statement for ! each of the parameters. Internally, insert cursors are used for batch inserts, ! which can result in a huge performance boost, especially over a network:: >>> cursor.executemany("INSERT INTO names VALUES(:1,:2,:3)", *************** *** 193,197 **** ------------------- ! Named Cursor can be created by passing the requested cursor name in as first argument to `Connection.cursor`:: --- 193,197 ---- ------------------- ! Named Cursors can be created by passing the requested cursor name in as first argument to `Connection.cursor`:: *************** *** 199,203 **** The returned `Cursor` object will then use this name whenever it declares a ! database cursor. It is important to note that a `Cursor` objects lifetime is decoupled from that actual database cursors. Database cursor are created whenever a SQL statement that can return a result set is executed (i.e. --- 199,203 ---- The returned `Cursor` object will then use this name whenever it declares a ! database cursor. It is important to note that a `Cursor` object's lifetime is decoupled from that actual database cursors. Database cursor are created whenever a SQL statement that can return a result set is executed (i.e. *************** *** 206,211 **** The main implication of this is that you cannot use the named `Cursor` ! object to execute statements on the named cursor, as that will destroy the ! database cursor before executing the statement. Instead a second (possibly unnamed) `Cursor` is used to execute ``... WHERE CURRENT OF ...`` statements:: --- 206,211 ---- The main implication of this is that you cannot use the named `Cursor` ! object to execute statements on the named cursor itself, as that will destroy ! the database cursor before executing the statement. Instead, a second (possibly unnamed) `Cursor` is used to execute ``... WHERE CURRENT OF ...`` statements:: *************** *** 240,250 **** `rowcount` ! Number of rows effected by the last executed statement, or -1 if no ! statement was executed or the number is not determinable. InformixDB ! only provides values for ``DELETE``, ``UPDATE`` and ``INSERT`` statements. `sqlerrd` ! Informix SQL error descriptor (``sqlerrd``) as tuple. `messages` --- 240,250 ---- `rowcount` ! Number of rows affected by the last executed statement, or -1 if no ! statement was executed or the number can not be determined. InformixDB ! only provides values for ``DELETE``, ``UPDATE``, and ``INSERT`` statements. `sqlerrd` ! Informix SQL error descriptor (``sqlerrd``) as a tuple. `messages` *************** *** 257,261 **** ============ ! When enabled in the underlying database transactions can be used by calling `commit` and `rollback` on a `Connection` object. A new transaction will automatically be started after the previous one was committed or rolled --- 257,261 ---- ============ ! When enabled in the underlying database, transactions can be used by calling `commit` and `rollback` on a `Connection` object. A new transaction will automatically be started after the previous one was committed or rolled *************** *** 301,305 **** ``NULL`` ! SQL ``NULL`` is represented by Pythons ``None`` when binding parameters or returning results. --- 301,305 ---- ``NULL`` ! SQL ``NULL`` is represented by Python's ``None`` when binding parameters or returning results. *************** *** 363,367 **** Base and catch-all for errors reported by the database. `DatabaseError` or subclasses of it are raised whenever a database ! oparations fails. When its possible to determine the class of an error via ``SQLSTATE``, the more specific error types are raised. --- 363,367 ---- Base and catch-all for errors reported by the database. `DatabaseError` or subclasses of it are raised whenever a database ! oparations fails. When it's possible to determine the class of an error via ``SQLSTATE``, the more specific error types are raised. *************** *** 396,401 **** `Warning` Represents a SQL warning (e.g. data truncation). This exception is never ! actually raised by the default error handler. By default warnings are ! only reported via the `Connection` or `Cursor` objects `messages` attribute (see `Advanced error handling`_). --- 396,401 ---- `Warning` Represents a SQL warning (e.g. data truncation). This exception is never ! actually raised by the default error handler. By default, warnings are ! only reported via the `Connection` or `Cursor` object's `messages` attribute (see `Advanced error handling`_). *************** *** 430,434 **** Sequence of all diagnostic messages reported by Informix where each item is a dictionary with keys ``'message'`` for a text representation of the ! error and ``'sqlstate'`` for the corresponding SQLSTATE value. Advanced error handling --- 430,434 ---- Sequence of all diagnostic messages reported by Informix where each item is a dictionary with keys ``'message'`` for a text representation of the ! message and ``'sqlstate'`` for the corresponding SQLSTATE value. Advanced error handling *************** *** 461,475 **** - The `Cursor` or `Connection` objects `errorhandler` attribute is checked to see if it is set. ! - If a `errorhandler` is available it is invoked with `connection`, `cursor`, `errorclass` and `errorvalue` as its arguments. The error ! handler might raise an exception or return in which case execution is continued. ! - If no `errorhandler` is available the built in error handler is invoked. A ``(errorclass, errorvalue)`` tuple is appended to the `Cursor` or ! `Connection` objects messages attribute and if the error is an actual ! error (i.e. not of type `Warning`) an exception is raised. ! .. _InformixDB on Sourceforge: http://www.sourceforge.net/projects/informixdb .. [#pep249] http://www.python.org/peps/pep-0249.html --- 461,475 ---- - The `Cursor` or `Connection` objects `errorhandler` attribute is checked to see if it is set. ! - If an `errorhandler` is available, it is invoked with `connection`, `cursor`, `errorclass` and `errorvalue` as its arguments. The error ! handler might raise an exception or return, in which case execution is continued. ! - If no `errorhandler` is available, the built in error handler is invoked. A ``(errorclass, errorvalue)`` tuple is appended to the `Cursor` or ! `Connection` object's messages attribute, and if the error is an actual ! error (i.e. not of type `Warning`), an exception is raised. ! .. _InformixDB on Sourceforge: http://informixdb.sourceforge.net/ .. [#pep249] http://www.python.org/peps/pep-0249.html |