*** pep-0249.txt.orig 2008-03-19 13:11:02.000000000 +0100 --- pep-0249.txt 2008-03-19 13:10:57.000000000 +0100 *************** *** 344,354 **** The parameters may also be specified as list of tuples to e.g. insert multiple rows in a single operation, but this kind of usage is deprecated: .executemany() should be used instead. ! Return values are not defined. .executemany(operation,seq_of_parameters) Prepare a database operation (query or command) and then execute it against all parameter sequences or mappings --- 344,354 ---- The parameters may also be specified as list of tuples to e.g. insert multiple rows in a single operation, but this kind of usage is deprecated: .executemany() should be used instead. ! This method returns the cursor object. .executemany(operation,seq_of_parameters) Prepare a database operation (query or command) and then execute it against all parameter sequences or mappings *************** *** 366,376 **** created by an invocation of the operation. The same comments as for .execute() also apply accordingly to this method. ! Return values are not defined. .fetchone() Fetch the next row of a query result set, returning a single sequence, or None when no more data is --- 366,376 ---- created by an invocation of the operation. The same comments as for .execute() also apply accordingly to this method. ! This method returns the cursor object. .fetchone() Fetch the next row of a query result set, returning a single sequence, or None when no more data is *************** *** 378,387 **** --- 378,390 ---- An Error (or subclass) exception is raised if the previous call to .execute*() did not produce any result set or no call was issued yet. + .fetchscalar() + This is a wrapper for .fetchone()[0]. + .fetchmany([size=cursor.arraysize]) Fetch the next set of rows of a query result, returning a sequence of sequences (e.g. a list of tuples). An empty sequence is returned when no more rows are available. *************** *** 804,813 **** --- 807,836 ---- executed statement modified more than one row, e.g. when using INSERT with .executemany(). Warning Message: "DB-API extension cursor.lastrowid used" + Connection Method .execute + This is a shorthand for creating a cursor object by calling .cursor(), + then executing the new cursor object's .execute() method with the + parameters specified. + + This method returns the newly created cursor object. + + Connection Method .executemany + This is a shorthand for creating a cursor object by calling .cursor(), + then executing the new cursor object's .executemany() method with the + parameters specified. + + This method returns the newly created cursor object. + + Connection Method .__enter__ + This method returns self. + + Connect Method .__exit__ + This method is implemented such that it calls .rollback() if any + exception has been raised, and .commit() otherwise. Optional Error Handling Extensions The core DB API specification only introduces a set of exceptions which can be raised to report errors to the user. In some cases,