Installation guide

Contents
5.7.1
Database Schema Introspection........................................................... 76
5.7.2 Result Set Introspection....................................................................... 76
Introspection via cursor.execute() .................................................. 77
Introspection via cursor.prepare() .................................................. 77
The cursor.description attribute...................................................... 77
name [0] ................................................................................... 77
type_code [1]............................................................................ 77
display_size [2] ......................................................................... 77
internal_size [3]......................................................................... 77
precision [4].............................................................................. 77
scale [5] .................................................................................... 77
null_ok [6]................................................................................. 78
The cursor.getcolattribute() method ............................................... 78
5.8 ODBC Cursor Types..........................................................78
5.8.1 Adjusting/Inspecting the ODBC Cursor Type....................................... 78
SQL.CURSOR_FORWARD_ONLY.............................................. 78
SQL.CURSOR_STATIC............................................................... 79
SQL.CURSOR_KEYSET_DRIVEN ................................................ 79
SQL.CURSOR_DYNAMIC.......................................................... 79
5.8.2 Default Cursor Type ............................................................................ 79
5.8.3 Effects of the Cursor Type on cursor.rownumber ................................ 80
5.8.4 Database Specific Cursor Type Notes .................................................. 80
MS SQL Server ............................................................................... 80
Oracle ............................................................................................ 80
PostgreSQL..................................................................................... 81
IBM DB2 ........................................................................................ 81
5.9 Custom Cursor Row Objects and Row Factory Functions..81
5.9.1 Cursor Row Constructor: cursor.row................................................... 81
Attribute Inheritance: cursor.row and connection.row ................... 82
5.9.2 Cursor Row Factories: cursor.rowfactory............................................. 82
On-the-fly Creation of Row Classes................................................ 82
Row Factories and multiple Result Sets........................................... 83
Predefined Row Factories ............................................................... 83
RowFactory.TupleRowFactory ................................................... 83
RowFactory.ListRowFactory....................................................... 83
RowFactory.NamespaceRowFactory.......................................... 84
Factory created Row Classes and pickle ......................................... 85
Attribute Inheritance: cursor.rowfactory and connection.rowfactory85